PStatClient¶
-
class PStatClient¶
Bases:
PStatsCallbackInheritance diagram
digraph inheritance52f715c51d { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "PStatClient" [URL="acron.core.PStatClient.html#acron.core.PStatClient",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "DTOOL_SUPER_BASE" -> "PStatClient" [arrowsize=0.75,style=""]; }- PStatClient.client_connect()¶
The nonstatic implementation of
connect().
- PStatClient.client_disconnect()¶
The nonstatic implementation of
disconnect().
- PStatClient.client_is_connected()¶
The nonstatic implementation of
is_connected().
- PStatClient.client_main_tick()¶
A convenience function to call new_frame() on the given PStatClient’s main thread, and any other threads with a sync_name of “Main”.
- PStatClient.client_resume_after_pause()¶
Resumes the
PStatClientafter 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.
- PStatClient.client_thread_tick()¶
A convenience function to call new_frame() on the current thread.
A convenience function to call new_frame() on all of the threads with the indicated sync name.
- static PStatClient.connect()¶
Attempts to establish a connection to the indicated PStatServer. Returns true if successful, false on failure.
- static PStatClient.disconnect()¶
Closes the connection previously established.
- PStatClient.get_client_name()¶
Retrieves the name of the client as set.
- PStatClient.get_collector()¶
Returns the nth collector.
- PStatClient.get_collector_def()¶
Returns the definition body of the nth collector.
- PStatClient.get_collector_fullname()¶
Returns the “full name” of the indicated collector. This will be the concatenation of all of the collector’s parents’ names (except Frame) and the collector’s own name.
- PStatClient.get_collector_name()¶
Returns the name of the indicated collector.
- PStatClient.get_current_thread()¶
Returns a handle to the currently-executing thread. This is the thread that
PStatCollectorswill be counted in if they do not specify otherwise.
- static PStatClient.get_global_pstats()¶
Returns a pointer to the global
PStatClientobject. It’s legal to declare your ownPStatClientlocally, but it’s also convenient to have a global one that everyone can register with. This is the global one.
- PStatClient.get_main_thread()¶
Returns a handle to the client’s Main thread. This is the thread that started the application.
- PStatClient.get_max_rate()¶
Returns the maximum number of packets that will be sent to the server per second, per thread. See
set_max_rate().
- PStatClient.get_num_collectors()¶
Returns the total number of collectors the Client knows about.
- PStatClient.get_num_threads()¶
Returns the total number of threads the Client knows about.
- PStatClient.get_real_time()¶
Returns the time according to to the PStatClient’s clock object. It keeps its own clock, instead of using the global clock object, so the stats won’t get mucked up if you put the global clock in non-real-time mode or something.
- PStatClient.get_thread()¶
Returns the nth thread.
- PStatClient.get_thread_name()¶
Returns the name of the indicated thread.
- PStatClient.get_thread_object()¶
Returns the Acron Thread object associated with the indicated
PStatThread.
- PStatClient.get_thread_sync_name()¶
Returns the sync_name of the indicated thread.
- static PStatClient.is_connected()¶
Returns true if the client believes it is connected to a working PStatServer, false otherwise.
- static PStatClient.main_tick()¶
A convenience function to call new_frame() on the global PStatClient’s main thread, and any other threads with a sync_name of “Main”.
- static PStatClient.resume_after_pause()¶
Resumes the
PStatClientafter 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.Deprecated: Do not use this, it creates inaccurate timing information.
- PStatClient.set_client_name()¶
Sets the name of the client. This is reported to the PStatsServer, and will presumably be written in the title bar or something.
- PStatClient.set_max_rate()¶
Controls the number of packets that will be sent to the server. Normally, one packet is sent per frame, but this can flood the server with more packets than it can handle if the frame rate is especially good (e.g. if nothing is onscreen at the moment). Set this parameter to a reasonable number to prevent this from happening.
This number specifies the maximum number of packets that will be sent to the server per second, per thread.
- static PStatClient.thread_tick()¶
A convenience function to call new_frame() for the current thread.
A convenience function to call new_frame() on any threads with the indicated sync_name