A lightweight class that represents a single thread of execution to PStats. More...
#include "pStatThread.h"
Public Member Functions | |
PStatThread () | |
Normally, this constructor is called only from PStatClient. More... | |
PStatThread (PStatClient *client, int index) | |
Normally, this constructor is called only from PStatClient. More... | |
PStatThread (Thread *thread, PStatClient *client=nullptr) | |
Creates a new named thread. More... | |
PStatThread (const PStatThread ©) | |
void | add_frame (const PStatFrameData &frame_data) |
This is a slightly lower-level version of new_frame that also specifies the data to send for this frame. More... | |
int | get_index () const |
Thread * | get_thread () const |
void | new_frame () |
This must be called at the start of every "frame", whatever a frame may be deemed to be, to accumulate all the stats that have collected so far for the thread and ship them off to the server. More... | |
void | operator= (const PStatThread ©) |
Public Attributes | |
get_index | |
Returns the index number of this particular thread within the PStatClient. More... | |
get_thread | |
Returns the Panda Thread object associated with this particular PStatThread. More... | |
Friends | |
class | PStatClient |
class | PStatCollector |
A lightweight class that represents a single thread of execution to PStats.
It corresponds one-to-one with Panda's Thread instance.
Definition at line 28 of file pStatThread.h.
|
inline |
Normally, this constructor is called only from PStatClient.
Use one of the constructors below to create your own Thread.
Definition at line 19 of file pStatThread.I.
Referenced by PStatThread().
|
inline |
Normally, this constructor is called only from PStatClient.
Use one of the constructors below to create your own Thread.
Definition at line 27 of file pStatThread.I.
|
inline |
Creates a new named thread.
This will be used to unify tasks that share a common thread, and differentiate tasks that occur in different threads.
Definition at line 38 of file pStatThread.I.
References Thread::get_pstats_index, and PStatThread().
void PStatThread::add_frame | ( | const PStatFrameData & | frame_data | ) |
This is a slightly lower-level version of new_frame that also specifies the data to send for this frame.
Definition at line 38 of file pStatThread.cxx.
void PStatThread::new_frame | ( | ) |
This must be called at the start of every "frame", whatever a frame may be deemed to be, to accumulate all the stats that have collected so far for the thread and ship them off to the server.
Calling PStatClient::thread_tick() will automatically call this for any threads with the indicated sync name.
Definition at line 27 of file pStatThread.cxx.
|
inline |
Returns the index number of this particular thread within the PStatClient.
Definition at line 46 of file pStatThread.h.
Thread * PStatThread::get_thread |
Returns the Panda Thread object associated with this particular PStatThread.
Definition at line 45 of file pStatThread.h.