When I am using cProfiler, I get the following line:
ncalls tottime percall cumtime percall filename:lineno(function)
39 12.486 0.320 12.486 0.320 {method 'acquire' of 'thread.lock' objects}
I understood that yappi is the way to go.
So I am writing:
yappi.get_func_stats().print_all()
and I get too many lines to read.
How can I retrieve only the 10 most ones that consume the most time?
Equivalent to:
p.sort_stats('time').print_stats(10)
I basically want to know what consumes the most amount of time.
I do run threads in my code with ThreadPoolExecutor