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

TraceEventNode is used to represents call tree of a trace. More...

+ Inheritance diagram for TraceEventNode:

Public Types

using TimeStamp = TraceEvent::TimeStamp
 
using AttributeData = TraceEventData
 
using AttributeMap = std::multimap< TfToken, AttributeData >
 
- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr )(TfRefBase const *, bool)
 

Public Member Functions

TraceEventNodeRefPtr Append (const TfToken &key, TraceCategoryId category, TimeStamp beginTime, TimeStamp endTime, bool separateEvents)
 Appends a new child node with key, category, beginTime and endTime. More...
 
void Append (TraceEventNodeRefPtr node)
 Appends node as a child node. More...
 
TfToken GetKey ()
 Returns the name of this node. More...
 
TraceCategoryId GetCategory () const
 Returns the category of this node. More...
 
void SetBeginAndEndTimesFromChildren ()
 Sets this node's begin and end time to the time extents of its direct children. More...
 
const AttributeMap & GetAttributes () const
 Return the data associated with this node. More...
 
void AddAttribute (const TfToken &key, const AttributeData &attr)
 Add data to this node. More...
 
bool IsFromSeparateEvents () const
 Returns whether this node was created from a Begin-End pair or a single Timespan event. More...
 
Profile Data Accessors
TimeStamp GetBeginTime ()
 Returns the time that this scope started. More...
 
TimeStamp GetEndTime ()
 Returns the time that this scope ended. More...
 
Children Accessors
const TraceEventNodeRefPtrVector & GetChildrenRef ()
 Returns references to the children of this node. More...
 
- Public Member Functions inherited from 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)
 

Static Public Member Functions

static TraceEventNodeRefPtr New ()
 Creates a new root node. More...
 
static TraceEventNodeRefPtr New (const TfToken &key, const TraceCategoryId category, const TimeStamp beginTime, const TimeStamp endTime, TraceEventNodeRefPtrVector &&children, const bool separateEvents)
 Creates a new node with key, category, beginTime and endTime. More...
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 

Detailed Description

TraceEventNode is used to represents call tree of a trace.

Each node represents a Begin-End trace event pair, or a single Timespan event. This is useful for timeline views of a trace.

Definition at line 53 of file eventNode.h.

Member Function Documentation

void AddAttribute ( const TfToken key,
const AttributeData attr 
)

Add data to this node.

TraceEventNodeRefPtr Append ( const TfToken key,
TraceCategoryId  category,
TimeStamp  beginTime,
TimeStamp  endTime,
bool  separateEvents 
)

Appends a new child node with key, category, beginTime and endTime.

void Append ( TraceEventNodeRefPtr  node)

Appends node as a child node.

const AttributeMap& GetAttributes ( ) const
inline

Return the data associated with this node.

Definition at line 128 of file eventNode.h.

TimeStamp GetBeginTime ( )
inline

Returns the time that this scope started.

Definition at line 110 of file eventNode.h.

TraceCategoryId GetCategory ( ) const
inline

Returns the category of this node.

Definition at line 100 of file eventNode.h.

const TraceEventNodeRefPtrVector& GetChildrenRef ( )
inline

Returns references to the children of this node.

Definition at line 121 of file eventNode.h.

TimeStamp GetEndTime ( )
inline

Returns the time that this scope ended.

Definition at line 113 of file eventNode.h.

TfToken GetKey ( )
inline

Returns the name of this node.

Definition at line 97 of file eventNode.h.

bool IsFromSeparateEvents ( ) const
inline

Returns whether this node was created from a Begin-End pair or a single Timespan event.

Definition at line 135 of file eventNode.h.

static TraceEventNodeRefPtr New ( )
inlinestatic

Creates a new root node.

Definition at line 62 of file eventNode.h.

static TraceEventNodeRefPtr New ( const TfToken key,
const TraceCategoryId  category,
const TimeStamp  beginTime,
const TimeStamp  endTime,
TraceEventNodeRefPtrVector &&  children,
const bool  separateEvents 
)
inlinestatic

Creates a new node with key, category, beginTime and endTime.

Definition at line 69 of file eventNode.h.

void SetBeginAndEndTimesFromChildren ( )

Sets this node's begin and end time to the time extents of its direct children.


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