8 #ifndef PXR_BASE_TRACE_COUNTER_ACCUMULATOR_H
9 #define PXR_BASE_TRACE_COUNTER_ACCUMULATOR_H
19 #include <unordered_map>
35 using CounterValues = std::vector<std::pair<TraceEvent::TimeStamp, double>>;
37 std::unordered_map<TfToken, CounterValues, TfToken::HashFunctor>;
39 std::unordered_map<TfToken, double, TfToken::HashFunctor>;
46 return _counterValuesOverTime;
54 return _currentValues;
67 virtual void OnBeginCollection()
override;
68 virtual void OnEndCollection()
override;
75 struct _CounterValue {
80 using _CounterDeltaValues =
81 std::multimap<TraceEvent::TimeStamp, _CounterValue>;
82 using _CounterDeltaMap = std::map<TfToken, _CounterDeltaValues>;
84 _CounterDeltaMap _counterDeltas;
91 #endif //PXR_BASE_TRACE_COUNTER_ACCUMULATOR_H
TraceCounterAccumulator()=default
Constructor.
TRACE_API void Update(const TraceCollection &collection)
std::vector< std::pair< TraceEvent::TimeStamp, double >> CounterValues
GLsizei const GLfloat * value
virtual bool _AcceptsCategory(TraceCategoryId id)=0
Determines whether or not counter events with id should be processed.
std::unordered_map< TfToken, CounterValues, TfToken::HashFunctor > CounterValuesMap
TRACE_API void SetCurrentValues(const CounterMap &)
Sets the current value of the counters.
const CounterMap & GetCurrentValues() const
Returns the current value of the counters.
std::unordered_map< TfToken, double, TfToken::HashFunctor > CounterMap
const CounterValuesMap & GetCounters() const
Returns a map of the counter values over time.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
uint32_t TraceCategoryId
Categories that a TraceReporter can use to filter events.