Loading...
Searching...
No Matches
TraceEventTree Class Reference

This class contains a timeline call tree and a map of counters to their values over time. More...

#include <eventTree.h>

+ Inheritance diagram for TraceEventTree:

Public Types

using CounterValues = std::vector<std::pair<TraceEvent::TimeStamp, double>>
 
using CounterValuesMap
 
using CounterMap
 
using MarkerValues = std::vector<std::pair<TraceEvent::TimeStamp, TraceThreadId>>
 
using MarkerValuesMap
 
using ExtraFieldFn = std::function<void(JsWriter&)>
 Writes a JSON object representing the data in the call tree that conforms to the Chrome Trace format.
 
- Public Types inherited from TfRefBase
typedef void(*) UniqueChangedFuncPtr(TfRefBase const *, bool)
 

Public Member Functions

const TraceEventNodeRefPtr & GetRoot () const
 Returns the root node of the tree.
 
const CounterValuesMap & GetCounters () const
 Returns the map of counter values.
 
const MarkerValuesMap & GetMarkers () const
 Returns the map of markers values.
 
CounterMap GetFinalCounterValues () const
 Return the final value of the counters in the report.
 
TRACE_API void WriteChromeTraceObject (JsWriter &writer, ExtraFieldFn extraFields=ExtraFieldFn()) const
 
TRACE_API void Merge (const TraceEventTreeRefPtr &tree)
 Adds the contexts of tree to this tree.
 
TRACE_API TraceEventTreeRefPtr Add (const TraceCollection &collection)
 Adds the data from collection to this tree.
 
- 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)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static TRACE_API TraceEventTreeRefPtr New (const TraceCollection &collection, const CounterMap *initialCounterValues=nullptr)
 Creates a new TraceEventTree instance from the data in collection and initialCounterValues.
 
static TraceEventTreeRefPtr New ()
 
static TraceEventTreeRefPtr New (TraceEventNodeRefPtr root, CounterValuesMap counters, MarkerValuesMap markers)
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 

Additional Inherited Members

- Protected Member Functions inherited from TfRefBase
- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

This class contains a timeline call tree and a map of counters to their values over time.

Definition at line 41 of file eventTree.h.

Member Typedef Documentation

◆ CounterMap

using CounterMap
Initial value:
std::unordered_map<TfToken, double, TfToken::HashFunctor>

Definition at line 46 of file eventTree.h.

◆ CounterValues

using CounterValues = std::vector<std::pair<TraceEvent::TimeStamp, double>>

Definition at line 43 of file eventTree.h.

◆ CounterValuesMap

using CounterValuesMap
Initial value:
std::unordered_map<TfToken, CounterValues, TfToken::HashFunctor>

Definition at line 44 of file eventTree.h.

◆ ExtraFieldFn

using ExtraFieldFn = std::function<void(JsWriter&)>

Writes a JSON object representing the data in the call tree that conforms to the Chrome Trace format.

Definition at line 86 of file eventTree.h.

◆ MarkerValues

using MarkerValues = std::vector<std::pair<TraceEvent::TimeStamp, TraceThreadId>>

Definition at line 49 of file eventTree.h.

◆ MarkerValuesMap

using MarkerValuesMap
Initial value:
std::unordered_map<TfToken, MarkerValues, TfToken::HashFunctor>

Definition at line 50 of file eventTree.h.

Member Function Documentation

◆ Add()

TRACE_API TraceEventTreeRefPtr Add ( const TraceCollection & collection)

Adds the data from collection to this tree.

◆ GetCounters()

const CounterValuesMap & GetCounters ( ) const
inline

Returns the map of counter values.

Definition at line 76 of file eventTree.h.

◆ GetFinalCounterValues()

CounterMap GetFinalCounterValues ( ) const

Return the final value of the counters in the report.

◆ GetMarkers()

const MarkerValuesMap & GetMarkers ( ) const
inline

Returns the map of markers values.

Definition at line 79 of file eventTree.h.

◆ GetRoot()

const TraceEventNodeRefPtr & GetRoot ( ) const
inline

Returns the root node of the tree.

Definition at line 73 of file eventTree.h.

◆ Merge()

TRACE_API void Merge ( const TraceEventTreeRefPtr & tree)

Adds the contexts of tree to this tree.

◆ New() [1/3]

static TraceEventTreeRefPtr New ( )
inlinestatic

Definition at line 59 of file eventTree.h.

◆ New() [2/3]

static TRACE_API TraceEventTreeRefPtr New ( const TraceCollection & collection,
const CounterMap * initialCounterValues = nullptr )
static

Creates a new TraceEventTree instance from the data in collection and initialCounterValues.

◆ New() [3/3]

static TraceEventTreeRefPtr New ( TraceEventNodeRefPtr root,
CounterValuesMap counters,
MarkerValuesMap markers )
inlinestatic

Definition at line 64 of file eventTree.h.


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