Loading...
Searching...
No Matches
HdPerfLog Class Reference

Performance counter monitoring. More...

#include <perfLog.h>

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.
 
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 ResetCache (TfToken const &name)
 
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 TfTokenVector GetCounterNames ()
 Returns a vector of all performance counter names.
 
HD_API void IncrementCounter (TfToken const &name)
 Increments a named counter by 1.0.
 
HD_API void DecrementCounter (TfToken const &name)
 Decrements a named counter by 1.0.
 
HD_API void SetCounter (TfToken const &name, double value)
 Sets the value of a named counter.
 
HD_API void AddCounter (TfToken const &name, double value)
 Adds value to a named counter.
 
HD_API void SubtractCounter (TfToken const &name, double value)
 Subtracts value to a named counter.
 
HD_API double GetCounter (TfToken const &name)
 Returns the current value of a named counter.
 
HD_API void ResetCounters ()
 Reset all conter values to 0.0.
 
void Enable ()
 Enable performance logging.
 
void Disable ()
 Disable performance logging.
 
HD_API void AddResourceRegistry (HdResourceRegistry *resourceRegistry)
 Add a resource registry to the tracking.
 
HD_API void RemoveResourceRegistry (HdResourceRegistry *resourceRegistry)
 Remove Resource Registry from the tracking.
 
HD_API std::vector< HdResourceRegistry * > const & GetResourceRegistryVector ()
 Returns a vector of resource registry.
 

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

◆ AddCacheHit()

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.

◆ AddCacheMiss()

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.

◆ AddCounter()

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

Adds value to a named counter.

◆ AddResourceRegistry()

HD_API void AddResourceRegistry ( HdResourceRegistry resourceRegistry)

Add a resource registry to the tracking.

◆ DecrementCounter()

HD_API void DecrementCounter ( TfToken const &  name)

Decrements a named counter by 1.0.

◆ Disable()

void Disable ( )
inline

Disable performance logging.

Definition at line 175 of file perfLog.h.

◆ Enable()

void Enable ( )
inline

Enable performance logging.

Definition at line 172 of file perfLog.h.

◆ GetCacheHitRatio()

HD_API double GetCacheHitRatio ( TfToken const &  name)

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

◆ GetCacheHits()

HD_API size_t GetCacheHits ( TfToken const &  name)

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

◆ GetCacheMisses()

HD_API size_t GetCacheMisses ( TfToken const &  name)

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

◆ GetCacheNames()

HD_API TfTokenVector GetCacheNames ( )

Returns the names of all cache performance counters.

◆ GetCounter()

HD_API double GetCounter ( TfToken const &  name)

Returns the current value of a named counter.

◆ GetCounterNames()

HD_API TfTokenVector GetCounterNames ( )

Returns a vector of all performance counter names.

◆ GetInstance()

static HD_API HdPerfLog & GetInstance ( )
inlinestatic

Definition at line 100 of file perfLog.h.

◆ GetResourceRegistryVector()

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

Returns a vector of resource registry.

◆ IncrementCounter()

HD_API void IncrementCounter ( TfToken const &  name)

Increments a named counter by 1.0.

◆ RemoveResourceRegistry()

HD_API void RemoveResourceRegistry ( HdResourceRegistry resourceRegistry)

Remove Resource Registry from the tracking.

◆ ResetCounters()

HD_API void ResetCounters ( )

Reset all conter values to 0.0.

Note that this doesn't reset cache counters.

◆ SetCounter()

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

Sets the value of a named counter.

◆ SubtractCounter()

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

Subtracts value to a named counter.

Friends And Related Function Documentation

◆ TfSingleton< HdPerfLog >

friend class TfSingleton< HdPerfLog >
friend

Definition at line 193 of file perfLog.h.


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