|
TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Helper class to aggregate metrics locally, and send them reguarly as events in the redis database as key 'prefix:metricEvents'. More...
#include <cpid2kworker.h>
Classes | |
| struct | Aggregator |
| struct | EventMetric |
Public Types | |
| enum | AggregationType { AggregateMean, AggregateSum, AggregateMin, AggregateMax, AggregateLast } |
Public Member Functions | |
| Cpid2kMetrics (std::shared_ptr< Cpid2kWorker > worker, std::chrono::milliseconds sendInterval=std::chrono::seconds(30)) | |
| ~Cpid2kMetrics () | |
| void | push (std::vector< EventMetric > const &metrics) |
Protected Types | |
| using | Clock = std::chrono::steady_clock |
Protected Member Functions | |
| void | run () |
Protected Attributes | |
| std::shared_ptr< Cpid2kWorker > | worker_ |
| std::chrono::milliseconds | sendInterval_ |
| std::thread | thr_ |
| std::atomic< bool > | stop_ |
| std::mutex | aggregatorsMutex_ |
| std::unordered_map< std::string, std::unique_ptr< Aggregator > > | aggregators_ |
Helper class to aggregate metrics locally, and send them reguarly as events in the redis database as key 'prefix:metricEvents'.
|
protected |
| cpid::Cpid2kMetrics::Cpid2kMetrics | ( | std::shared_ptr< Cpid2kWorker > | worker, |
| std::chrono::milliseconds | sendInterval = std::chrono::seconds(30) |
||
| ) |
| cpid::Cpid2kMetrics::~Cpid2kMetrics | ( | ) |
| void cpid::Cpid2kMetrics::push | ( | std::vector< EventMetric > const & | metrics | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.11