Python profiling tools using cProfile and pstats
pip install profiling-tools
Importing
from profiling_tools.profiling_utils import profile
Usage as decorator
@profile
def some_function():
...
Running your function some_function
with the profile
decorator
produces a file stats/some_function.stats
containing the results of the profiling
created with cProfile.
This file can then be analyzed and visualized using the analyze_stats
module.