Link Search Menu Expand Document

arena-py API v0.9.6

arena.utils.program_info

Collect information about the program execution, such as activity times and number of messages sent/received.

class GetPublicAttrsMixin:
def get_attrs(self, **kwargs):

Return object public members only

class QueueStats(builtins.dict):
rcv_queue_len
pub_queue_len
Inherited Members
builtins.dict
get
setdefault
pop
popitem
keys
items
values
update
fromkeys
clear
copy

Program Run Information; collect program execution information.

ProgramRunInfo( evt_loop=None, queue_len_callable=None, update_callback=None, update_interval_ms=5000, **kwargs)

Returns a ProgramRunInfo. If an event loop is passed, will setup a periodic task to update execution stats and perform a callback to notify of this update

Args: evt_loop: an event loop to which we add a periodic task to update program stats queue_len_callable: callable that returns a queue stats object update_callback: callback when stats are updated update_interval_ms: interval of the periodic task to update program stats kwargs: additional attributes to add to the program info, e.g. web host, scene, namespace

object_type = 'run_info'
filename
args
env
create_time
last_active_time
rcv_msgs
pub_msgs
last_rcv_time
last_pub_time
avg_rcv_msgs_per_sec
avg_pub_msgs_per_sec
def msg_rcv(self):

Update stats when a message is received

def msg_publish(self):

Update stats when a message is published

def add_program_info(self, adict):

Add program info to another dictionary