25class EXPCL_PANDA_PGRAPH CacheStats {
27 CacheStats() =
default;
29 void reset(
double now);
30 void write(std::ostream &out,
const char *name)
const;
43 int _cache_misses = 0;
45 int _cache_new_adds = 0;
47 int _total_cache_size = 0;
49 double _last_reset = 0.0;
51 bool _cache_report =
false;
52 double _cache_report_interval = 0.0;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void reset(double now)
Reinitializes just those parts of the CacheStats that should be reset between each reporting interval...
void inc_adds(bool is_new)
Increments by 1 the count of elements added to the cache.
void add_total_size(int count)
Adds the indicated count (positive or negative) to the total number of entries for the cache (net occ...
void add_num_states(int count)
Adds the indicated count (positive or negative) to the total count of individual RenderState or Trans...
void maybe_report(const char *name)
Outputs a report if enough time has elapsed.
void inc_dels()
Increments by 1 the count of elements removed from the cache.
void init()
Initializes the CacheStats for the first time.
void inc_hits()
Increments by 1 the count of cache hits.
void inc_misses()
Increments by 1 the count of cache misses.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.