25 #ifndef PXR_BASE_TRACE_AGGREGATE_NODE_H
26 #define PXR_BASE_TRACE_AGGREGATE_NODE_H
71 Id() : _valid(false) {}
86 const int exclusiveCount = 1) {
92 int c = 1,
int xc = 1);
114 return recursive ? _recursiveCount : _count;
145 return TraceAggregateNodePtrVector( _children.begin(),_children.end() );
162 _expanded = expanded;
180 uint64_t *numDescendantNodes =
nullptr);
212 int count,
int exclusiveCount) :
213 _id(id), _key(key), _ts(ts), _exclusiveTs(ts),
214 _count(count), _exclusiveCount(exclusiveCount),
215 _recursiveCount(count), _recursiveExclusiveTs(ts), _expanded(false),
216 _isRecursionMarker(false), _isRecursionHead(false),
217 _isRecursionProcessed(false) {}
221 void _MergeRecursive(
const TraceAggregateNodeRefPtr &node);
223 void _SetAsRecursionMarker(TraceAggregateNodePtr parent);
236 TraceAggregateNodePtr _recursionParent;
239 TraceAggregateNodeRefPtrVector _children;
240 _ChildDictionary _childrenByKey;
245 struct _CounterValue {
246 _CounterValue() : inclusive(0.0), exclusive(0.0) {}
254 _CounterValues _counterValues;
263 _isRecursionMarker:1,
272 _isRecursionProcessed:1;
277 #endif // PXR_BASE_TRACE_AGGREGATE_NODE_H
TfRefPtr< T > TfCreateRefPtr(T *ptr)
TRACE_API double GetInclusiveCounterValue(int index) const
TfToken GetKey()
Returns the node's key.
TRACE_API void MarkRecursiveChildren()
bool IsExpanded()
Returns whether this node is expanded in a gui.
TRACE_API TraceAggregateNodeRefPtr GetChild(const TfToken &key)
GLsizei const GLchar *const * string
void SetExpanded(bool expanded)
Sets whether or not this node is expanded in a gui.
int GetExclusiveCount() const
Returns the exclusive count.
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_AND_REF_PTRS(TraceAggregateNode)
TraceAggregateNodeRefPtr ThisRefPtr
TraceAggregateNodeRefPtr GetChild(const std::string &key)
bool IsRecursionHead() const
TRACE_API void AppendExclusiveCounterValue(int index, double value)
TRACE_API TimeStamp GetExclusiveTime(bool recursive=false)
Returns the time spent in this node but not its children.
static ThisRefPtr New(const Id &id, const TfToken &key, const TimeStamp ts, const int count=1, const int exclusiveCount=1)
TRACE_API void AdjustForOverheadAndNoise(TimeStamp scopeOverhead, TimeStamp timerQuantum, uint64_t *numDescendantNodes=nullptr)
const TraceAggregateNodeRefPtrVector & GetChildrenRef()
TRACE_API void AppendInclusiveCounterValue(int index, double value)
const TraceAggregateNodePtrVector GetChildren()
Id(const TraceThreadId &)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
int GetCount(bool recursive=false) const
TRACE_API double GetExclusiveCounterValue(int index) const
#define PXR_NAMESPACE_CLOSE_SCOPE
TRACE_API void CalculateInclusiveCounterValues()
uint64_t TimeStamp
Time in "ticks".
bool IsRecursionMarker() const
TimeStamp GetInclusiveTime()
Returns the total time of this node ands its children.
TraceEvent::TimeStamp TimeStamp
TRACE_API TraceAggregateNodeRefPtr Append(Id id, const TfToken &key, TimeStamp ts, int c=1, int xc=1)
TraceAggregateNodePtr ThisPtr
const Id & GetId()
Returns the node's id.