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.