Panda3D
Static Public Member Functions
PStatClient Class Reference

Manages the communications to report statistics via a network connection to a remote PStatServer. More...

#include "pStatClient.h"

List of all members.

Static Public Member Functions

static bool connect (const string &=string(), int=-1)
 Attempts to establish a connection to the indicated PStatServer.
static void disconnect ()
 Closes the connection previously established.
static bool is_connected ()
 Returns true if the client believes it is connected to a working PStatServer, false otherwise.
static void main_tick ()
static void resume_after_pause ()
 Resumes the PStatClient after the simulation has been paused for a while.
static void thread_tick (const string &)

Detailed Description

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 257 of file pStatClient.h.


Member Function Documentation

bool PStatClient::connect ( const string &  hostname = string(),
int  port = -1 
) [inline, static]

Attempts to establish a connection to the indicated PStatServer.

Returns true if successful, false on failure.

Definition at line 263 of file pStatClient.h.

Referenced by PandaFramework::event_S().

void PStatClient::disconnect ( ) [inline, static]

Closes the connection previously established.

Definition at line 264 of file pStatClient.h.

bool PStatClient::is_connected ( ) [inline, static]

Returns true if the client believes it is connected to a working PStatServer, false otherwise.

Definition at line 265 of file pStatClient.h.

Referenced by GeomCacheManager::evict_old_entries(), GeomCacheEntry::refresh(), and GraphicsEngine::render_frame().

void PStatClient::resume_after_pause ( ) [inline, static]

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 266 of file pStatClient.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations