aea.helpers.profiling
Implementation of background profiling daemon.
Profiling Objects
Profiling service.
__init__
| __init__(period: int = 0, objects_instances_to_count: List[Type] = None, objects_created_to_count: List[Type] = None, output_function: Callable[[str], None] = lambda x: print(x, flush=True)) -> None
Init profiler.
Arguments:
period: delay between profiling output in seconds.objects_instances_to_count: object to countobjects_created_to_count: object created to countoutput_function: function to display output, one str argument.
set_counters
Modify obj.new to count objects created created.
run
Run profiling.
output_profile_data
Render profiling data and call output_function.
get_profile_data
Get profiling data dict.
get_objects_instances
Return dict with counted object instances present now.
get_objecst_created
Return dict with counted object instances created.