Panda3D
|
A lightweight class that represents a single element that may be timed and/or counted via stats. More...
#include "pStatCollector.h"
Public Member Functions | |
PStatCollector () | |
Creates an invalid PStatCollector. | |
PStatCollector (const PStatCollector &parent, const std::string &name) | |
This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing. | |
PStatCollector (const std::string &name, PStatClient *client=nullptr) | |
This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing. | |
void | add_level (const PStatThread &, double) |
void | add_level (double) |
void | add_level_now (double) |
void | clear_level () |
void | clear_level (const PStatThread &) |
void | flush_level () |
int | get_index () const |
double | get_level () |
double | get_level (const PStatThread &) |
bool | is_active () |
bool | is_active (const PStatThread &) |
bool | is_started () |
void | set_level (const PStatThread &, double) |
void | set_level (double) |
void | start () |
void | start (const PStatThread &) |
void | start (const PStatThread &, double) |
void | stop () |
void | stop (const PStatThread &) |
void | stop (const PStatThread &, double) |
void | sub_level (const PStatThread &, double) |
void | sub_level (double) |
void | sub_level_now (double) |
A lightweight class that represents a single element that may be timed and/or counted via stats.
Collectors can be used to measure two different kinds of values: elapsed time, and "other".
To measure elapsed time, call start() and stop() as appropriate to bracket the section of code you want to time (or use a PStatTimer to do this automatically).
To measure anything else, call set_level() and/or add_level() to set the "level" value associated with this collector. The meaning of the value set for the "level" is entirely up to the user; it may represent the number of triangles rendered or the kilobytes of texture memory consumed, for instance. The level set will remain fixed across multiple frames until it is reset via another set_level() or adjusted via a call to add_level(). It may also be completely removed via clear_level().
Definition at line 43 of file pStatCollector.h.
|
inline |
Creates an invalid PStatCollector.
Any attempt to use this collector will crash messily.
You can reassign it to a different, valid one later.
Definition at line 473 of file pStatCollector.I.
|
inline |
This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing.
Definition at line 482 of file pStatCollector.I.
|
inline |
This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing.
Definition at line 497 of file pStatCollector.I.
|
inline |
Definition at line 138 of file pStatCollector.h.
|
inline |
Definition at line 123 of file pStatCollector.h.
|
inline |
Definition at line 125 of file pStatCollector.h.
|
inline |
Definition at line 121 of file pStatCollector.h.
|
inline |
Definition at line 136 of file pStatCollector.h.
|
inline |
Definition at line 127 of file pStatCollector.h.
|
inline |
Definition at line 142 of file pStatCollector.h.
|
inline |
Definition at line 128 of file pStatCollector.h.
|
inline |
Definition at line 140 of file pStatCollector.h.
|
inline |
Definition at line 116 of file pStatCollector.h.
|
inline |
Definition at line 130 of file pStatCollector.h.
|
inline |
Definition at line 117 of file pStatCollector.h.
|
inline |
Definition at line 137 of file pStatCollector.h.
|
inline |
Definition at line 122 of file pStatCollector.h.
|
inline |
Definition at line 118 of file pStatCollector.h.
|
inline |
Definition at line 131 of file pStatCollector.h.
|
inline |
Definition at line 132 of file pStatCollector.h.
|
inline |
Definition at line 119 of file pStatCollector.h.
|
inline |
Definition at line 133 of file pStatCollector.h.
|
inline |
Definition at line 134 of file pStatCollector.h.
|
inline |
Definition at line 139 of file pStatCollector.h.
|
inline |
Definition at line 124 of file pStatCollector.h.
|
inline |
Definition at line 126 of file pStatCollector.h.