Pyinstrument
Simple code to get started with Pyinstrument
from pyinstrument import Profiler
profiler = Profiler()
profiler.start()
expensive_operation()
profiler.stop()
print(profiler.output_text())
Simple code to get started with Pyinstrument
from pyinstrument import Profiler
profiler = Profiler()
profiler.start()
expensive_operation()
profiler.stop()
print(profiler.output_text())