Loading...
Searching...
No Matches
TraceCounterAccumulator Class Referenceabstract

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

#include <counterAccumulator.h>

+ Inheritance diagram for TraceCounterAccumulator:

Public Types

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

Public Member Functions

 TraceCounterAccumulator ()=default
 Constructor.
 
const CounterValuesMap & GetCounters () const
 Returns a map of the counter values over time.
 
TRACE_API void SetCurrentValues (const CounterMap &)
 Sets the current value of the counters.
 
const CounterMap & GetCurrentValues () const
 Returns 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.
 

Protected Member Functions

virtual bool _AcceptsCategory (TraceCategoryId id)=0
 Determines whether or not counter events with id should be processed.
 

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

Member Typedef Documentation

◆ CounterMap

using CounterMap
Initial value:
std::unordered_map<TfToken, double, TfToken::HashFunctor>

Definition at line 38 of file counterAccumulator.h.

◆ CounterValues

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

Definition at line 35 of file counterAccumulator.h.

◆ CounterValuesMap

using CounterValuesMap
Initial value:
std::unordered_map<TfToken, CounterValues, TfToken::HashFunctor>

Definition at line 36 of file counterAccumulator.h.

Constructor & Destructor Documentation

◆ TraceCounterAccumulator()

Constructor.

Member Function Documentation

◆ _AcceptsCategory()

virtual bool _AcceptsCategory ( TraceCategoryId id)
protectedpure virtual

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

◆ GetCounters()

const CounterValuesMap & GetCounters ( ) const
inline

Returns a map of the counter values over time.

Definition at line 45 of file counterAccumulator.h.

◆ GetCurrentValues()

const CounterMap & GetCurrentValues ( ) const
inline

Returns the current value of the counters.

Definition at line 53 of file counterAccumulator.h.

◆ SetCurrentValues()

TRACE_API void SetCurrentValues ( const CounterMap & )

Sets the current value of the counters.

◆ Update()

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: