HDK
|
#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 HdPerfLog & | GetInstance () |
Friends | |
class | TfSingleton< HdPerfLog > |
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.
Adds value to a named counter.
HD_API void HdPerfLog::AddResourceRegistry | ( | HdResourceRegistry * | resourceRegistry | ) |
Add a resource registry to the tracking.
|
inline |
|
inline |
Gets the hit ratio (numHits / totalRequests) of a cache performance counter.
Gets the number of hit hits for a cache performance counter.
Gets the number of hit misses for a cache performance counter.
HD_API TfTokenVector HdPerfLog::GetCacheNames | ( | ) |
Returns the names of all cache performance counters.
Returns the current value of a named counter.
HD_API TfTokenVector HdPerfLog::GetCounterNames | ( | ) |
Returns a vector of all performance counter names.
HD_API std::vector<HdResourceRegistry*> const& HdPerfLog::GetResourceRegistryVector | ( | ) |
Returns a vector of resource registry.
HD_API void HdPerfLog::RemoveResourceRegistry | ( | HdResourceRegistry * | resourceRegistry | ) |
Remove Resource Registry from the tracking.
Reset all conter values to 0.0. Note that this doesn't reset cache counters.
Sets the value of a named counter.
Subtracts value to a named counter.
|
friend |