|
HDK
|
#include <counterAccumulator.h>
Inheritance diagram for TraceCounterAccumulator:Public Types | |
| using | CounterValues = std::vector< std::pair< TraceEvent::TimeStamp, double >> |
| using | CounterValuesMap = std::unordered_map< TfToken, CounterValues, TfToken::HashFunctor > |
| using | CounterMap = std::unordered_map< TfToken, double, TfToken::HashFunctor > |
Public Member Functions | |
| TraceCounterAccumulator ()=default | |
| Constructor. More... | |
| const CounterValuesMap & | GetCounters () const |
| Returns a map of the counter values over time. More... | |
| TRACE_API void | SetCurrentValues (const CounterMap &) |
| Sets the current value of the counters. More... | |
| const CounterMap & | GetCurrentValues () const |
| Returns the current value of the counters. More... | |
| TRACE_API void | Update (const TraceCollection &collection) |
Protected Member Functions | |
| virtual bool | _AcceptsCategory (TraceCategoryId id)=0 |
Determines whether or not counter events with id should be processed. More... | |
This class accumulates counter values from TraceCollection instances. A TraceCounterAccumulator instance can accumulate counters from multiple collections or the state of the counters can be set explicitly through SetCurrentValues().
Definition at line 33 of file counterAccumulator.h.
| using TraceCounterAccumulator::CounterMap = std::unordered_map<TfToken, double, TfToken::HashFunctor> |
Definition at line 39 of file counterAccumulator.h.
| using TraceCounterAccumulator::CounterValues = std::vector<std::pair<TraceEvent::TimeStamp, double>> |
Definition at line 35 of file counterAccumulator.h.
| using TraceCounterAccumulator::CounterValuesMap = std::unordered_map<TfToken, CounterValues, TfToken::HashFunctor> |
Definition at line 37 of file counterAccumulator.h.
|
default |
Constructor.
|
protectedpure virtual |
Determines whether or not counter events with id should be processed.
|
inline |
Returns a map of the counter values over time.
Definition at line 45 of file counterAccumulator.h.
|
inline |
Returns the current value of the counters.
Definition at line 53 of file counterAccumulator.h.
| TRACE_API void TraceCounterAccumulator::SetCurrentValues | ( | const CounterMap & | ) |
Sets the current value of the counters.
| TRACE_API void TraceCounterAccumulator::Update | ( | const TraceCollection & | collection | ) |
Reads events /p collection and updates the current values of the counters.