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

Performance counter monitoring. More...

Public Member Functions

HD_API void AddCacheHit (TfToken const &name, SdfPath const &id, TfToken const &tag=TfToken())
 Tracks a cache hit for the named cache, the id and tag are reported when debug logging is enabled. More...
 
HD_API void AddCacheMiss (TfToken const &name, SdfPath const &id, TfToken const &tag=TfToken())
 Tracks a cache miss for the named cache, the id and tag are reported when debug logging is enabled. More...
 
HD_API void ResetCache (TfToken const &name)
 
HD_API double GetCacheHitRatio (TfToken const &name)
 Gets the hit ratio (numHits / totalRequests) of a cache performance counter. More...
 
HD_API size_t GetCacheHits (TfToken const &name)
 Gets the number of hit hits for a cache performance counter. More...
 
HD_API size_t GetCacheMisses (TfToken const &name)
 Gets the number of hit misses for a cache performance counter. More...
 
HD_API TfTokenVector GetCacheNames ()
 Returns the names of all cache performance counters. More...
 
HD_API TfTokenVector GetCounterNames ()
 Returns a vector of all performance counter names. More...
 
HD_API void IncrementCounter (TfToken const &name)
 Increments a named counter by 1.0. More...
 
HD_API void DecrementCounter (TfToken const &name)
 Decrements a named counter by 1.0. More...
 
HD_API void SetCounter (TfToken const &name, double value)
 Sets the value of a named counter. More...
 
HD_API void AddCounter (TfToken const &name, double value)
 Adds value to a named counter. More...
 
HD_API void SubtractCounter (TfToken const &name, double value)
 Subtracts value to a named counter. More...
 
HD_API double GetCounter (TfToken const &name)
 Returns the current value of a named counter. More...
 
HD_API void ResetCounters ()
 Reset all conter values to 0.0. More...
 
void Enable ()
 Enable performance logging. More...
 
void Disable ()
 Disable performance logging. More...
 
HD_API void AddResourceRegistry (HdResourceRegistry *resourceRegistry)
 Add a resource registry to the tracking. More...
 
HD_API void RemoveResourceRegistry (HdResourceRegistry *resourceRegistry)
 Remove Resource Registry from the tracking. More...
 
HD_API std::vector
< HdResourceRegistry * > const & 
GetResourceRegistryVector ()
 Returns a vector of resource registry. More...
 

Static Public Member Functions

static HD_API HdPerfLogGetInstance ()
 

Friends

class TfSingleton< HdPerfLog >
 

Detailed Description

Performance counter monitoring.

Definition at line 96 of file perfLog.h.

Member Function Documentation

HD_API void AddCacheHit ( TfToken const &  name,
SdfPath const &  id,
TfToken const &  tag = TfToken() 
)

Tracks a cache hit for the named cache, the id and tag are reported when debug logging is enabled.

HD_API void AddCacheMiss ( TfToken const &  name,
SdfPath const &  id,
TfToken const &  tag = TfToken() 
)

Tracks a cache miss for the named cache, the id and tag are reported when debug logging is enabled.

HD_API void AddCounter ( TfToken const &  name,
double  value 
)

Adds value to a named counter.

HD_API void AddResourceRegistry ( HdResourceRegistry resourceRegistry)

Add a resource registry to the tracking.

HD_API void DecrementCounter ( TfToken const &  name)

Decrements a named counter by 1.0.

void Disable ( )
inline

Disable performance logging.

Definition at line 175 of file perfLog.h.

void Enable ( )
inline

Enable performance logging.

Definition at line 172 of file perfLog.h.

HD_API double GetCacheHitRatio ( TfToken const &  name)

Gets the hit ratio (numHits / totalRequests) of a cache performance counter.

HD_API size_t GetCacheHits ( TfToken const &  name)

Gets the number of hit hits for a cache performance counter.

HD_API size_t GetCacheMisses ( TfToken const &  name)

Gets the number of hit misses for a cache performance counter.

HD_API TfTokenVector GetCacheNames ( )

Returns the names of all cache performance counters.

HD_API double GetCounter ( TfToken const &  name)

Returns the current value of a named counter.

HD_API TfTokenVector GetCounterNames ( )

Returns a vector of all performance counter names.

HD_API std::vector<HdResourceRegistry*> const& GetResourceRegistryVector ( )

Returns a vector of resource registry.

HD_API void IncrementCounter ( TfToken const &  name)

Increments a named counter by 1.0.

HD_API void RemoveResourceRegistry ( HdResourceRegistry resourceRegistry)

Remove Resource Registry from the tracking.

HD_API void ResetCounters ( )

Reset all conter values to 0.0.

Note that this doesn't reset cache counters.

HD_API void SetCounter ( TfToken const &  name,
double  value 
)

Sets the value of a named counter.

HD_API void SubtractCounter ( TfToken const &  name,
double  value 
)

Subtracts value to a named counter.


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