Loading...
Searching...
No Matches
TraceEventNode Class Reference

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

#include <eventNode.h>

+ 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

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

Static Public Member Functions

static TRACE_API TraceEventNodeRefPtr New ()
 Creates a new root node.
 
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.
 
- 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 37 of file eventNode.h.

Member Typedef Documentation

◆ AttributeData

Definition at line 41 of file eventNode.h.

◆ AttributeMap

using AttributeMap = std::multimap<TfToken, AttributeData>

Definition at line 42 of file eventNode.h.

◆ TimeStamp

using TimeStamp = TraceEvent::TimeStamp

Definition at line 40 of file eventNode.h.

Constructor & Destructor Documentation

◆ ~TraceEventNode()

~TraceEventNode ( )
inline

Definition at line 120 of file eventNode.h.

Member Function Documentation

◆ AddAttribute()

TRACE_API void AddAttribute ( const TfToken key,
AttributeData &&  attr 
)

Add data to this node.

◆ Append() [1/2]

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

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

◆ Append() [2/2]

TRACE_API void Append ( TraceEventNodeRefPtr  node)

Appends node as a child node.

◆ GetAttributes()

TRACE_API const AttributeMap & GetAttributes ( ) const

Return the data associated with this node.

◆ GetBeginTime()

TimeStamp GetBeginTime ( ) const
inline

Returns the time that this scope started.

Definition at line 91 of file eventNode.h.

◆ GetCategory()

TraceCategoryId GetCategory ( ) const
inline

Returns the category of this node.

Definition at line 81 of file eventNode.h.

◆ GetChildrenRef()

TfSpan< const TraceEventNodeRefPtr > GetChildrenRef ( ) const
inline

Returns a TfSpan of references to the children of this node.

Definition at line 102 of file eventNode.h.

◆ GetEndTime()

TimeStamp GetEndTime ( ) const
inline

Returns the time that this scope ended.

Definition at line 94 of file eventNode.h.

◆ GetKey()

const TfToken & GetKey ( ) const
inline

Returns the name of this node.

Definition at line 78 of file eventNode.h.

◆ IsFromSeparateEvents()

bool IsFromSeparateEvents ( ) const
inline

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

Definition at line 116 of file eventNode.h.

◆ New() [1/2]

static TRACE_API TraceEventNodeRefPtr New ( )
static

Creates a new root node.

◆ New() [2/2]

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 50 of file eventNode.h.

◆ SetBeginAndEndTimesFromChildren()

TRACE_API 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: