pyinstrument icon indicating copy to clipboard operation
pyinstrument copied to clipboard

Feature request: cumulated time / total time / ncalls statistics + report

Open loehnertj opened this issue 4 years ago • 0 comments

I used pyinstrument today to find bottlenecks in my optical simulation code, and found it overall very helpful. The HTML report is very usable and looks great!

One feature I was missing (or didn't find :-)) compared to builtin cProfile, is the possibility to sort / display cumulative time for individual functions. I.e. total time spent in that function, regardless of the call stack above. This is really crucial to find "hot" functions, i.e. with short runtime but high call count.

In the simplest form, the HTML report could show this as on-hover popup; or make it more fancy and display a sorted list grouped by module / function...

If this already possible, I'd appreciate a pointer on how to...

loehnertj avatar Nov 30 '21 12:11 loehnertj