gnome.utilities.profiledeco

Purpose of this is to allow fast implementation of profiling during development by adding decorators where profiling is desired.

@profile def foo():

sleep(1)

this should profile foo whenever it is called and add it to the global profile stats.

Module Contents

Functions

profile(func)

print_func_profile(*args, **kwargs)

print_stats(*args, **kwargs)

clear_stats()

Just rebuild the global object

Attributes

profiler

gnome.utilities.profiledeco.profiler
gnome.utilities.profiledeco.profile(func)
gnome.utilities.profiledeco.print_func_profile(*args, **kwargs)
gnome.utilities.profiledeco.print_stats(*args, **kwargs)
gnome.utilities.profiledeco.clear_stats()

Just rebuild the global object