Panda3D
|
Manages the communications to report statistics via a network connection to a remote PStatServer. More...
#include "pStatClient.h"
Public Member Functions | |
bool | client_connect (std::string hostname, int port) |
void | client_disconnect () |
bool | client_is_connected () const |
void | client_main_tick () |
void | client_resume_after_pause () |
void | client_thread_tick (const std::string &sync_name) |
std::string | get_client_name () const |
PStatCollector | get_collector (int index) const |
std::string | get_collector_fullname (int index) const |
std::string | get_collector_name (int index) const |
PStatThread | get_current_thread () const |
PStatThread | get_main_thread () const |
double | get_max_rate () const |
int | get_num_threads () const |
Returns the total number of threads the Client knows about. More... | |
double | get_real_time () const |
PStatThread | get_thread (int index) const |
std::string | get_thread_name (int index) const |
Returns the name of the indicated thread. More... | |
std::string | get_thread_sync_name (int index) const |
Returns the sync_name of the indicated thread. More... | |
PT (Thread) get_thread_object(int index) const | |
void | set_client_name (const std::string &name) |
void | set_max_rate (double rate) |
Static Public Member Functions | |
static bool | connect (const std::string &=std::string(), int=-1) |
static void | disconnect () |
Closes the connection previously established. More... | |
static PStatClient * | get_global_pstats () |
static bool | is_connected () |
Returns true if the client believes it is connected to a working PStatServer, false otherwise. More... | |
static void | main_tick () |
static void | resume_after_pause () |
Resumes the PStatClient after the simulation has been paused for a while. More... | |
static void | thread_tick (const std::string &) |
Manages the communications to report statistics via a network connection to a remote PStatServer.
Normally, there is only one PStatClient in the world, although it is possible to have multiple PStatClients if extraordinary circumstances require in. Since each PStatCollector registers itself with the PStatClient when it is created, having multiple PStatClients requires special care when constructing the various PStatCollectors.
If DO_PSTATS is not defined, we don't want to use stats at all. This class is therefore defined as a stub class.
Definition at line 263 of file pStatClient.h.
|
inlinestatic |
Closes the connection previously established.
Definition at line 290 of file pStatClient.h.
|
inline |
Returns the total number of threads the Client knows about.
Definition at line 277 of file pStatClient.h.
|
inline |
Returns the name of the indicated thread.
Definition at line 279 of file pStatClient.h.
|
inline |
Returns the sync_name of the indicated thread.
Definition at line 280 of file pStatClient.h.
|
inlinestatic |
Returns true if the client believes it is connected to a working PStatServer, false otherwise.
Definition at line 291 of file pStatClient.h.
|
inlinestatic |
Resumes the PStatClient after the simulation has been paused for a while.
This allows the stats to continue exactly where it left off, instead of leaving a big gap that would represent a chug.
Definition at line 292 of file pStatClient.h.