8 #ifndef PXR_BASE_TRACE_AGGREGATE_NODE_H
9 #define PXR_BASE_TRACE_AGGREGATE_NODE_H
56 const int exclusiveCount = 1) {
84 return recursive ? _recursiveCount : _count;
115 return TraceAggregateNodePtrVector( _children.begin(),_children.end() );
123 TraceAggregateNodeRefPtr
GetChild(
const std::string &key) {
132 _expanded = expanded;
150 uint64_t *numDescendantNodes =
nullptr);
182 int count,
int exclusiveCount) :
183 _key(key), _ts(ts), _exclusiveTs(ts),
184 _count(count), _exclusiveCount(exclusiveCount),
185 _recursiveCount(count), _recursiveExclusiveTs(ts), _expanded(false),
186 _isRecursionMarker(false), _isRecursionHead(false),
187 _isRecursionProcessed(false) {}
191 void _MergeRecursive(
const TraceAggregateNodeRefPtr &node);
193 void _SetAsRecursionMarker(TraceAggregateNodePtr parent);
206 TraceAggregateNodePtr _recursionParent;
209 TraceAggregateNodeRefPtrVector _children;
210 _ChildDictionary _childrenByKey;
215 struct _CounterValue {
216 _CounterValue() : inclusive(0.0), exclusive(0.0) {}
224 _CounterValues _counterValues;
233 _isRecursionMarker:1,
242 _isRecursionProcessed:1;
247 #endif // PXR_BASE_TRACE_AGGREGATE_NODE_H
TfRefPtr< T > TfCreateRefPtr(T *ptr)
TRACE_API double GetInclusiveCounterValue(int index) const
TRACE_API void MarkRecursiveChildren()
bool IsExpanded()
Returns whether this node is expanded in a gui.
const TfToken & GetKey()
Returns the node's key.
TRACE_API TraceAggregateNodeRefPtr GetChild(const TfToken &key)
#define PXR_NAMESPACE_OPEN_SCOPE
GLsizei const GLfloat * value
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
TRACE_API TraceAggregateNodeRefPtr Append(const TfToken &key, TimeStamp ts, int c=1, int xc=1)
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.
TRACE_API void AdjustForOverheadAndNoise(TimeStamp scopeOverhead, TimeStamp timerQuantum, uint64_t *numDescendantNodes=nullptr)
TRACE_API void AppendBlind(const TfToken &key, TimeStamp ts, int c=1, int xc=1)
const TraceAggregateNodeRefPtrVector & GetChildrenRef()
TRACE_API void AppendInclusiveCounterValue(int index, double value)
const TraceAggregateNodePtrVector GetChildren()
static ThisRefPtr New(const TfToken &key, const TimeStamp ts, const int count=1, const int exclusiveCount=1)
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
TraceAggregateNodePtr ThisPtr