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

#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 void Append (TraceEventNodeRefPtr &&node)
 Appends node as a child node. More...
 
void Append (const TraceEventNodeRefPtr &node)
 Appends node as a child node. More...
 
const TfTokenGetKey () const
 Returns the name of this node. More...
 
TraceCategoryId GetCategory () const
 Returns the category of this node. More...
 
TRACE_API void SetBeginAndEndTimesFromChildren ()
 
TRACE_API const AttributeMapGetAttributes () const
 Return the data associated with this node. More...
 
TRACE_API void AddAttribute (const TfToken &key, AttributeData &&attr)
 
bool IsFromSeparateEvents () const
 
 ~TraceEventNode () override
 
Profile Data Accessors
TimeStamp GetBeginTime () const
 Returns the time that this scope started. More...
 
TimeStamp GetEndTime () const
 Returns the time that this scope ended. More...
 
TimeStamp GetTimeDuration () const
 Returns the time duration of this scope as GetEndTime() - GetBeginTime() More...
 
Children Accessors
TfSpan< const
TraceEventNodeRefPtr > 
GetChildrenRef () const
 Returns a TfSpan of references to the children of this node. More...
 
- Public Member Functions inherited from TfSimpleRefBase
virtual TF_API ~TfSimpleRefBase ()
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
 TfRefBase (TfRefBase const &)
 
TfRefBaseoperator= (TfRefBase const &)
 
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...
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 

Static Public Member Functions

static TRACE_API
TraceEventNodeRefPtr 
New ()
 
static TraceEventNodeRefPtr New (const TfToken &key, const TraceCategoryId category, const TimeStamp beginTime, const TimeStamp endTime, const bool separateEvents)
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 

Friends

class Trace_EventTreeBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from TfRefBase
virtual TF_API ~TfRefBase ()
 

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

Definition at line 41 of file eventNode.h.

Definition at line 42 of file eventNode.h.

Definition at line 40 of file eventNode.h.

Constructor & Destructor Documentation

TraceEventNode::~TraceEventNode ( )
override

Member Function Documentation

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

Add data to this node. If attribute data already exists for key, attr is prepended to the values associated with key.

TRACE_API void TraceEventNode::Append ( TraceEventNodeRefPtr &&  node)

Appends node as a child node.

void TraceEventNode::Append ( const TraceEventNodeRefPtr &  node)
inline

Appends node as a child node.

Definition at line 65 of file eventNode.h.

TRACE_API const AttributeMap& TraceEventNode::GetAttributes ( ) const

Return the data associated with this node.

TimeStamp TraceEventNode::GetBeginTime ( ) const
inline

Returns the time that this scope started.

Definition at line 83 of file eventNode.h.

TraceCategoryId TraceEventNode::GetCategory ( ) const
inline

Returns the category of this node.

Definition at line 73 of file eventNode.h.

TfSpan<const TraceEventNodeRefPtr> TraceEventNode::GetChildrenRef ( ) const
inline

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

Definition at line 97 of file eventNode.h.

TimeStamp TraceEventNode::GetEndTime ( ) const
inline

Returns the time that this scope ended.

Definition at line 86 of file eventNode.h.

const TfToken& TraceEventNode::GetKey ( ) const
inline

Returns the name of this node.

Definition at line 70 of file eventNode.h.

TimeStamp TraceEventNode::GetTimeDuration ( ) const
inline

Returns the time duration of this scope as GetEndTime() - GetBeginTime()

Definition at line 89 of file eventNode.h.

bool TraceEventNode::IsFromSeparateEvents ( ) const
inline

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

Definition at line 112 of file eventNode.h.

static TRACE_API TraceEventNodeRefPtr TraceEventNode::New ( )
static

Creates a new root node.

static TraceEventNodeRefPtr TraceEventNode::New ( const TfToken key,
const TraceCategoryId  category,
const TimeStamp  beginTime,
const TimeStamp  endTime,
const bool  separateEvents 
)
inlinestatic

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

Definition at line 50 of file eventNode.h.

TRACE_API void TraceEventNode::SetBeginAndEndTimesFromChildren ( )

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

Friends And Related Function Documentation

friend class Trace_EventTreeBuilder
friend

Definition at line 119 of file eventNode.h.


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