Loading...
Searching...
No Matches
TraceAggregateTree Class Reference

A representation of a call tree. More...

#include <aggregateTree.h>

+ Inheritance diagram for TraceAggregateTree:

Public Types

using This = TraceAggregateTree
 
using ThisPtr = TraceAggregateTreePtr
 
using ThisRefPtr = TraceAggregateTreeRefPtr
 
using TimeStamp = TraceEvent::TimeStamp
 
using EventTimes = std::map< TfToken, TimeStamp >
 
using CounterMap = TfHashMap< TfToken, double, TfToken::HashFunctor >
 
- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr) (TfRefBase const *, bool)
 

Public Member Functions

TraceAggregateNodePtr GetRoot ()
 Returns the root node of the tree.
 
const EventTimes & GetEventTimes () const
 Returns a map of event keys to total inclusive time.
 
const CounterMap & GetCounters () const
 Returns a map of counters (counter keys), associated with their total accumulated value.
 
TRACE_API int GetCounterIndex (const TfToken &key) const
 Returns the numeric index associated with a counter key.
 
TRACE_API bool AddCounter (const TfToken &key, int index, double totalValue)
 Add a counter to the tree.
 
TRACE_API void Clear ()
 Removes all data and nodes from the tree.
 
TRACE_API void Append (const TraceEventTreeRefPtr &eventTree, const TraceCollection &collection)
 Creates new nodes and counter data from data in eventTree and collection.
 
- Public Member Functions inherited from TfRefBase
 TfRefBase (TfRefBase const &)
 
TfRefBaseoperator= (TfRefBase const &)
 
size_t GetCurrentCount () const
 Return the current reference count of this object.
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object.
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static ThisRefPtr New ()
 Create an empty tree.
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 

Friends

class Trace_AggregateTreeBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

A representation of a call tree.

Each node represents one or more calls that occurred in the trace. Multiple calls to a child node are aggregated into one node.

Definition at line 48 of file aggregateTree.h.

Member Typedef Documentation

◆ CounterMap

using CounterMap = TfHashMap<TfToken, double, TfToken::HashFunctor>

Definition at line 56 of file aggregateTree.h.

◆ EventTimes

using EventTimes = std::map<TfToken, TimeStamp>

Definition at line 55 of file aggregateTree.h.

◆ This

Definition at line 50 of file aggregateTree.h.

◆ ThisPtr

using ThisPtr = TraceAggregateTreePtr

Definition at line 51 of file aggregateTree.h.

◆ ThisRefPtr

using ThisRefPtr = TraceAggregateTreeRefPtr

Definition at line 52 of file aggregateTree.h.

◆ TimeStamp

using TimeStamp = TraceEvent::TimeStamp

Definition at line 54 of file aggregateTree.h.

Member Function Documentation

◆ AddCounter()

TRACE_API bool AddCounter ( const TfToken key,
int  index,
double  totalValue 
)

Add a counter to the tree.

This method can be used to restore a previous trace state and tree. Note, that the counter being added must have a unique key and index. The method will return false if a key or index already exists.

◆ Append()

TRACE_API void Append ( const TraceEventTreeRefPtr &  eventTree,
const TraceCollection collection 
)

Creates new nodes and counter data from data in eventTree and collection.


◆ Clear()

TRACE_API void Clear ( )

Removes all data and nodes from the tree.

◆ GetCounterIndex()

TRACE_API int GetCounterIndex ( const TfToken key) const

Returns the numeric index associated with a counter key.

Counter values on the event nodes will have to be looked up by the numeric index.

◆ GetCounters()

const CounterMap & GetCounters ( ) const
inline

Returns a map of counters (counter keys), associated with their total accumulated value.

Each individual event node in the tree may also hold on to an inclusive and exclusive value for the given counter.

Definition at line 72 of file aggregateTree.h.

◆ GetEventTimes()

const EventTimes & GetEventTimes ( ) const
inline

Returns a map of event keys to total inclusive time.

Definition at line 67 of file aggregateTree.h.

◆ GetRoot()

TraceAggregateNodePtr GetRoot ( )
inline

Returns the root node of the tree.

Definition at line 64 of file aggregateTree.h.

◆ New()

static ThisRefPtr New ( )
inlinestatic

Create an empty tree.

Definition at line 59 of file aggregateTree.h.

Friends And Related Function Documentation

◆ Trace_AggregateTreeBuilder

friend class Trace_AggregateTreeBuilder
friend

Definition at line 104 of file aggregateTree.h.


The documentation for this class was generated from the following file: