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 = std::unordered_map< TfToken, CounterValues, TfToken::HashFunctor >
 
using CounterMap = std::unordered_map< TfToken, double, TfToken::HashFunctor >
 

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

Member Typedef Documentation

◆ CounterMap

using CounterMap = std::unordered_map<TfToken, double, TfToken::HashFunctor>

Definition at line 55 of file counterAccumulator.h.

◆ CounterValues

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

Definition at line 52 of file counterAccumulator.h.

◆ CounterValuesMap

using CounterValuesMap = std::unordered_map<TfToken, CounterValues, TfToken::HashFunctor>

Definition at line 53 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 62 of file counterAccumulator.h.

◆ GetCurrentValues()

const CounterMap & GetCurrentValues ( ) const
inline

Returns the current value of the counters.

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