HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TraceCounterAccumulator Class Referenceabstract

#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 CounterValuesMapGetCounters () 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 CounterMapGetCurrentValues () 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...
 

Detailed Description

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 50 of file counterAccumulator.h.

Member Typedef Documentation

Definition at line 56 of file counterAccumulator.h.

using TraceCounterAccumulator::CounterValues = std::vector<std::pair<TraceEvent::TimeStamp, double>>

Definition at line 52 of file counterAccumulator.h.

Constructor & Destructor Documentation

TraceCounterAccumulator::TraceCounterAccumulator ( )
default

Constructor.

Member Function Documentation

virtual bool TraceCounterAccumulator::_AcceptsCategory ( TraceCategoryId  id)
protectedpure virtual

Determines whether or not counter events with id should be processed.

const CounterValuesMap& TraceCounterAccumulator::GetCounters ( ) const
inline

Returns a map of the counter values over time.

Definition at line 62 of file counterAccumulator.h.

const CounterMap& TraceCounterAccumulator::GetCurrentValues ( ) const
inline

Returns the current value of the counters.

Definition at line 70 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.


The documentation for this class was generated from the following file: