aea.helpers.profiling
Implementation of background profiling daemon.
Profiling Objects
class Profiling(Runnable)
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.output_function
: function to display ouput, one str argument.
set_
counters
| set_counters() -> None
Modify obj.new to count objects created created.
run
| async run() -> None
Run profiling.
output_
profile_
data
| output_profile_data() -> None
Render profiling data and call output_function.
get_
profile_
data
| get_profile_data() -> Dict
Get profiling data dict.
get_
objects_
instances
| get_objects_instances() -> Dict
Return dict with counted object instances present now.
get_
objecst_
created
| get_objecst_created() -> Dict
Return dict with counted object instances created.