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

This class accumulates counter values from TraceCollection instances. More...

+ 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)
 Reads events /p collection and updates the current values of the counters. More...
 

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.

Constructor & Destructor Documentation

Constructor.

Member Function Documentation

virtual bool _AcceptsCategory ( TraceCategoryId  id)
protectedpure virtual

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

const CounterValuesMap& GetCounters ( ) const
inline

Returns a map of the counter values over time.

Definition at line 62 of file counterAccumulator.h.

const CounterMap& GetCurrentValues ( ) const
inline

Returns the current value of the counters.

Definition at line 70 of file counterAccumulator.h.

TRACE_API void SetCurrentValues ( const CounterMap &  )

Sets the current value of the counters.

TRACE_API void 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: