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

#include <perfLog.h>

Public Member Functions

HD_API void AddCacheHit (TfToken const &name, SdfPath const &id, TfToken const &tag=TfToken())
 
HD_API void AddCacheMiss (TfToken const &name, SdfPath const &id, TfToken const &tag=TfToken())
 
HD_API void ResetCache (TfToken const &name)
 
HD_API double GetCacheHitRatio (TfToken const &name)
 
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 ()
 
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 HdPerfLog::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 HdPerfLog::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 HdPerfLog::AddCounter ( TfToken const name,
double  value 
)

Adds value to a named counter.

HD_API void HdPerfLog::AddResourceRegistry ( HdResourceRegistry resourceRegistry)

Add a resource registry to the tracking.

HD_API void HdPerfLog::DecrementCounter ( TfToken const name)

Decrements a named counter by 1.0.

void HdPerfLog::Disable ( )
inline

Disable performance logging.

Definition at line 175 of file perfLog.h.

void HdPerfLog::Enable ( )
inline

Enable performance logging.

Definition at line 172 of file perfLog.h.

HD_API double HdPerfLog::GetCacheHitRatio ( TfToken const name)

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

HD_API size_t HdPerfLog::GetCacheHits ( TfToken const name)

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

HD_API size_t HdPerfLog::GetCacheMisses ( TfToken const name)

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

HD_API TfTokenVector HdPerfLog::GetCacheNames ( )

Returns the names of all cache performance counters.

HD_API double HdPerfLog::GetCounter ( TfToken const name)

Returns the current value of a named counter.

HD_API TfTokenVector HdPerfLog::GetCounterNames ( )

Returns a vector of all performance counter names.

static HD_API HdPerfLog& HdPerfLog::GetInstance ( )
inlinestatic

Definition at line 100 of file perfLog.h.

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

Returns a vector of resource registry.

HD_API void HdPerfLog::IncrementCounter ( TfToken const name)

Increments a named counter by 1.0.

HD_API void HdPerfLog::RemoveResourceRegistry ( HdResourceRegistry resourceRegistry)

Remove Resource Registry from the tracking.

HD_API void HdPerfLog::ResetCache ( TfToken const name)
HD_API void HdPerfLog::ResetCounters ( )

Reset all conter values to 0.0. Note that this doesn't reset cache counters.

HD_API void HdPerfLog::SetCounter ( TfToken const name,
double  value 
)

Sets the value of a named counter.

HD_API void HdPerfLog::SubtractCounter ( TfToken const name,
double  value 
)

Subtracts value to a named counter.

Friends And Related Function Documentation

friend class TfSingleton< HdPerfLog >
friend

Definition at line 195 of file perfLog.h.


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