Open dpinol opened 6 months ago
You could try the 'flat' option on the console renderer - e.g. pyinstrument -p flat myscript.py
- that will print the output without any tree at all.
I created a pull request so it can be enabled from api https://github.com/joerick/pyinstrument/pull/294
You can, if you like, use the output
method, e.g. profiler.output(ConsoleRenderer(flat=True))
. But your PR looks good too.
pyinstrument is a wonderful tool, but it's challenging to use on recursive functions
In this case, it's difficult to estimate the sum of the time spent on other functions called by the recursive functions (the ones at the bottom on the following snapshot)
Is there any way of obtaining the flat or cum times (as here) of the most sampled functions?
thanks