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

#include <eventTree.h>

+ Inheritance diagram for TraceEventTree:

Public Types

using CounterValues = std::vector< std::pair< TraceEvent::TimeStamp, double >>
 
using CounterValuesMap = std::unordered_map< TfToken, CounterValues, TfToken::HashFunctor >
 
using CounterMap = std::unordered_map< TfToken, double, TfToken::HashFunctor >
 
using MarkerValues = std::vector< std::pair< TraceEvent::TimeStamp, TraceThreadId >>
 
using MarkerValuesMap = std::unordered_map< TfToken, MarkerValues, TfToken::HashFunctor >
 
using ExtraFieldFn = std::function< void(JsWriter &)>
 
- 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. More...
 
const CounterValuesMapGetCounters () const
 Returns the map of counter values. More...
 
const MarkerValuesMapGetMarkers () const
 Returns the map of markers values. More...
 
CounterMap GetFinalCounterValues () const
 Return the final value of the counters in the report. More...
 
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. More...
 
TRACE_API TraceEventTreeRefPtr Add (const TraceCollection &collection)
 Adds the data from collection to this tree. More...
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
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...
 
const TfRefCountGetRefCount () const
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase ()
 
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void constGetUniqueIdentifier () const
 

Static Public Member Functions

static TRACE_API
TraceEventTreeRefPtr 
New (const TraceCollection &collection, const CounterMap *initialCounterValues=nullptr)
 
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
virtual TF_API ~TfRefBase ()
 
- Protected Member Functions inherited from TfWeakBase
 ~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 58 of file eventTree.h.

Member Typedef Documentation

using TraceEventTree::CounterMap = std::unordered_map<TfToken, double, TfToken::HashFunctor>

Definition at line 64 of file eventTree.h.

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

Definition at line 60 of file eventTree.h.

Definition at line 62 of file eventTree.h.

using TraceEventTree::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 103 of file eventTree.h.

Definition at line 66 of file eventTree.h.

Definition at line 68 of file eventTree.h.

Member Function Documentation

TRACE_API TraceEventTreeRefPtr TraceEventTree::Add ( const TraceCollection collection)

Adds the data from collection to this tree.

const CounterValuesMap& TraceEventTree::GetCounters ( ) const
inline

Returns the map of counter values.

Definition at line 93 of file eventTree.h.

CounterMap TraceEventTree::GetFinalCounterValues ( ) const

Return the final value of the counters in the report.

const MarkerValuesMap& TraceEventTree::GetMarkers ( ) const
inline

Returns the map of markers values.

Definition at line 96 of file eventTree.h.

const TraceEventNodeRefPtr& TraceEventTree::GetRoot ( ) const
inline

Returns the root node of the tree.

Definition at line 90 of file eventTree.h.

TRACE_API void TraceEventTree::Merge ( const TraceEventTreeRefPtr &  tree)

Adds the contexts of tree to this tree.

static TRACE_API TraceEventTreeRefPtr TraceEventTree::New ( const TraceCollection collection,
const CounterMap initialCounterValues = nullptr 
)
static

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

static TraceEventTreeRefPtr TraceEventTree::New ( )
inlinestatic

Definition at line 76 of file eventTree.h.

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

Definition at line 81 of file eventTree.h.

TRACE_API void TraceEventTree::WriteChromeTraceObject ( JsWriter writer,
ExtraFieldFn  extraFields = ExtraFieldFn() 
) const

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