pyutils / line_profiler

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

Enable line_profiler for all modules (and for entire module) #295

Open dshivashankar1994 opened 1 month ago

dshivashankar1994 commented 1 month ago

I'd like to use line_profiler for profiling imports. My aim is to use the line_profiler to identify any global statement that is taking more time.

Is there a way to enable line_profiler by default for the entire module ?

I saw pprofile. But it has the issue - https://github.com/vpelletier/pprofile/issues/54

Erotemic commented 1 month ago

Check out auto-profiling https://kernprof.readthedocs.io/en/latest/line_profiler.autoprofile.html#module-line_profiler.autoprofile