src package
Subpackages
Submodules
src.benchmark module
src.data_loader module
src.time_profiler module
- class src.time_profiler.TimeProfiler[source]
Bases:
object- enable(func)[source]
@tp.enable decorator is used to indicate that we want to extract the cumulative timing measurement for the function to which it is applied.
- profile(func)[source]
@tp.profile decorator is applied to a function for which we want to run cProfile (ideally it should be the outermost function in the workflow). Rather than displaying all cProfile outputs, we find rows corresponding to the functions selected by @tp.enable, plus some extra rows interesting for us. The outputs are saved in a Pandas DataFrame.