25 #ifndef PXR_BASE_TRACE_REPORTER_H
26 #define PXR_BASE_TRACE_REPORTER_H
36 #include "pxr/base/tf/mallocTag.h"
44 #define TRACE_REPORTER_TOKENS \
45 ((warningString, "WARNING:"))
107 int iterationCount=1);
202 void _RebuildEventAndAggregateTrees();
203 void _PrintTimes(std::ostream &
s);
208 bool _groupByFunction;
209 bool _foldRecursiveCalls;
210 bool _shouldAdjustForOverheadAndNoise;
212 TraceAggregateTreeRefPtr _aggregateTree;
213 TraceEventTreeRefPtr _eventTree;
218 #endif // PXR_BASE_TRACE_REPORTER_H
TfHashMap< TfToken, double, TfToken::HashFunctor > CounterMap
TfRefPtr< T > TfCreateRefPtr(T *ptr)
static ThisRefPtr New(const std::string &label, DataSourcePtr dataSource)
Create a new reporter with label and dataSource.
TRACE_API void ReportTimes(std::ostream &s)
Generates a report of the times to the ostream s.
GLuint GLsizei const GLchar * label
TraceReporterRefPtr ThisRefPtr
TRACE_API void Report(std::ostream &s, int iterationCount=1)
GLsizei const GLchar *const * string
static TRACE_API TraceReporterPtr GetGlobalReporter()
Returns the global reporter.
TRACE_API TraceEventTreeRefPtr GetEventTree()
Returns the event call tree.
std::unique_ptr< TraceReporterDataSourceBase > DataSourcePtr
TRACE_API bool GetFoldRecursiveCalls() const
const std::string & GetLabel()
Return the label associated with this reporter.
TRACE_API void SetFoldRecursiveCalls(bool)
static TRACE_API TraceAggregateNode::Id CreateValidEventId()
TF_DECLARE_WEAK_AND_REF_PTRS(TraceAggregateTree)
TraceEvent::TimeStamp TimeStamp
TRACE_API bool AddCounter(const TfToken &key, int index, double totalValue)
TRACE_API TraceReporter(const std::string &label, DataSourcePtr dataSource)
TRACE_API void SetShouldAdjustForOverheadAndNoise(bool adjust)
static ThisRefPtr New(const std::string &label)
Create a new reporter with label and no data source.
TRACE_API void ClearTree()
Clears event tree and counters.
TRACE_API TraceAggregateNodePtr GetAggregateTreeRoot()
Returns the root node of the aggregated call tree.
std::shared_ptr< TraceCollection > CollectionPtr
TRACE_API int GetCounterIndex(const TfToken &key) const
TRACE_API void SetGroupByFunction(bool)
TRACE_API bool ShouldAdjustForOverheadAndNoise() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
TRACE_API TraceEventNodeRefPtr GetEventRoot()
Returns the root node of the call tree.
#define PXR_NAMESPACE_CLOSE_SCOPE
uint64_t TimeStamp
Time in "ticks".
TRACE_API void UpdateTraceTrees()
TF_DECLARE_PUBLIC_TOKENS(TraceReporterTokens, TRACE_API, TRACE_REPORTER_TOKENS)
TRACE_API const CounterMap & GetCounters() const
TRACE_API void ReportChromeTracing(std::ostream &s)
TF_MALLOC_TAG_NEW("Trace","TraceReporter")
virtual TRACE_API ~TraceReporter()
Destructor.
#define TRACE_REPORTER_TOKENS
TRACE_API bool GetGroupByFunction() const
Returns the current group-by-function state.