pyutils / line_profiler

Line-by-line profiling for Python
Other
2.57k stars 118 forks source link

Can I get %prun format result from line_profiler? #217

Open PaleNeutron opened 1 year ago

PaleNeutron commented 1 year ago

I want to profile a function contains multiprocess and if I use %prun I can only see something like

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1109   10.339    0.009   10.339    0.009 {method 'acquire' of '_thread.lock' objects}

Functions inside child process will not be profiled.

line_profiler can get into process but I can only view result for one function line by line so I have to step into hot function using -f time and time.

Can I get %prun style result which counting all function called inside one function?