|
Panda3D
|
This is used to track the utilization of the TransformState and RenderState caches, for low-level performance tuning information. More...
#include "cacheStats.h"
Public Member Functions | |
| void | add_num_states (int count) |
| Adds the indicated count (positive or negative) to the total count of individual RenderState or TransformState objects. | |
| void | add_total_size (int count) |
| Adds the indicated count (positive or negative) to the total number of entries for the cache (net occupied size of all the hashtables). | |
| void | inc_adds (bool is_new) |
| Increments by 1 the count of elements added to the cache. | |
| void | inc_dels () |
| Increments by 1 the count of elements removed from the cache. | |
| void | inc_hits () |
| Increments by 1 the count of cache hits. | |
| void | inc_misses () |
| Increments by 1 the count of cache misses. | |
| void | init () |
| Initializes the CacheStats for the first time. | |
| void | maybe_report (const char *name) |
| Outputs a report if enough time has elapsed. | |
| void | reset (double now) |
| Reinitializes just those parts of the CacheStats that should be reset between each reporting interval. | |
| void | write (std::ostream &out, const char *name) const |
This is used to track the utilization of the TransformState and RenderState caches, for low-level performance tuning information.
Definition at line 25 of file cacheStats.h.
|
inline |
Adds the indicated count (positive or negative) to the total count of individual RenderState or TransformState objects.
Definition at line 90 of file cacheStats.I.
|
inline |
Adds the indicated count (positive or negative) to the total number of entries for the cache (net occupied size of all the hashtables).
Definition at line 79 of file cacheStats.I.
|
inline |
Increments by 1 the count of elements added to the cache.
If is_new is true, the element was added to a previously empty hashtable.
Definition at line 55 of file cacheStats.I.
|
inline |
Increments by 1 the count of elements removed from the cache.
Definition at line 68 of file cacheStats.I.
|
inline |
Increments by 1 the count of cache hits.
Definition at line 34 of file cacheStats.I.
|
inline |
Increments by 1 the count of cache misses.
Definition at line 44 of file cacheStats.I.
| void CacheStats::init | ( | ) |
Initializes the CacheStats for the first time.
We don't use the constructor for this, since we can't guarantee ordering of static constructors.
Definition at line 21 of file cacheStats.cxx.
|
inline |
Outputs a report if enough time has elapsed.
Definition at line 17 of file cacheStats.I.
References ClockObject::get_global_clock(), ClockObject::get_real_time, Notify::out(), and reset().
| void CacheStats::reset | ( | double | now | ) |
Reinitializes just those parts of the CacheStats that should be reset between each reporting interval.
Definition at line 36 of file cacheStats.cxx.
Referenced by maybe_report().
| void CacheStats::write | ( | std::ostream & | out, |
| const char * | name ) const |
Definition at line 51 of file cacheStats.cxx.