HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TraceAggregateTree Class Reference

#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. More...
 
const EventTimesGetEventTimes () const
 Returns a map of event keys to total inclusive time. More...
 
const CounterMapGetCounters () const
 
TRACE_API int GetCounterIndex (const TfToken &key) const
 
TRACE_API bool AddCounter (const TfToken &key, int index, double totalValue)
 
TRACE_API void Clear ()
 Removes all data and nodes from the tree. More...
 
TRACE_API void Append (const TraceEventTreeRefPtr &eventTree, const TraceCollection &collection)
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
size_t GetCurrentCount () const
 Return the current reference count of this object. More...
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object. More...
 
const TfRefCountGetRefCount () const
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase ()
 
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void constGetUniqueIdentifier () const
 

Static Public Member Functions

static ThisRefPtr New ()
 Create an empty tree. More...
 
- 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 TfRefBase
virtual TF_API ~TfRefBase ()
 
- Protected Member Functions inherited from TfWeakBase
 ~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

Definition at line 55 of file aggregateTree.h.

Definition at line 50 of file aggregateTree.h.

using TraceAggregateTree::ThisPtr = TraceAggregateTreePtr

Definition at line 51 of file aggregateTree.h.

using TraceAggregateTree::ThisRefPtr = TraceAggregateTreeRefPtr

Definition at line 52 of file aggregateTree.h.

Member Function Documentation

TRACE_API bool TraceAggregateTree::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.

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

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

TRACE_API void TraceAggregateTree::Clear ( )

Removes all data and nodes from the tree.

TRACE_API int TraceAggregateTree::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.

const CounterMap& TraceAggregateTree::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.

const EventTimes& TraceAggregateTree::GetEventTimes ( ) const
inline

Returns a map of event keys to total inclusive time.

Definition at line 67 of file aggregateTree.h.

TraceAggregateNodePtr TraceAggregateTree::GetRoot ( )
inline

Returns the root node of the tree.

Definition at line 64 of file aggregateTree.h.

static ThisRefPtr TraceAggregateTree::New ( )
inlinestatic

Create an empty tree.

Definition at line 59 of file aggregateTree.h.

Friends And Related Function Documentation

friend class Trace_AggregateTreeBuilder
friend

Definition at line 104 of file aggregateTree.h.


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