rkern / line_profiler

(OLD REPO) Line-by-line profiling for Python - Current repo ->
https://github.com/pyutils/line_profiler
Other
3.6k stars 254 forks source link

line_profiler for all functions and [if __name__ == "__main__":] #131

Open ManPython opened 6 years ago

ManPython commented 6 years ago
  1. Is there any simple way to use line_profiler as call kernprof.exe -l -v -all example.py where -all getting all functions that we have without decorate them?

  2. How we can profile the part of code where is if name == "main" ?

jhagege commented 5 years ago

Did you find any workaround for this behavior ? Thanks !

ManPython commented 5 years ago

@jhagege no progress here.

timabbott commented 5 years ago

I would love to see this as well. And relatedly, the ability for adding @profile on a class definition to automatically profile all functions in the class.

(Also, I have to say, this tool is super useful!)