aea.helpers.profiling
Implementation of background profiling daemon.
Profiling Objects
class Profiling(Runnable)
Profiling service.
__
init__
def __init__(
types_to_track: List[Type],
period: int = 0,
output_function: Callable[[str], None] = lambda x: print(x, flush=True)
) -> None
Init profiler.
Arguments:
period
: delay between profiling output in seconds.types_to_track
: object types to countoutput_function
: function to display output, one str argument.
set_
counters
def set_counters() -> None
Modify new and del to count objects created created and destroyed.
run
async def run() -> None
Run profiling.
output_
profile_
data
def output_profile_data() -> None
Render profiling data and call output_function.
get_
profile_
data
def get_profile_data() -> Dict
Get profiling data dict.
get_
most_
common_
objects_
in_
gc
def get_most_common_objects_in_gc(number: int = 15) -> List[Tuple[str, int]]
Get the highest-count objects in the garbage collector.