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

Assorted -b issues #96

Closed jkterry1 closed 6 years ago

jkterry1 commented 7 years ago

Full details and original discussion here: https://www.reddit.com/r/learnpython/comments/6qtmc2/line_profiler_library_not_working_with_python3_on/

I of course may be wrong but it at least looks like -b breaks --view, reading the .prof output otherwise and the documentation regarding needing to use it is confusing to beginners.

rkern commented 7 years ago

Are you trying to do line-profiling or regular function-profiling?

rkern commented 7 years ago

Well, since your example has no function calls inside the @profiled function, I assume line-profiling. You need to use the -l option for line-profiling. kernprof handles both, but function-profiling by default.

https://github.com/rkern/line_profiler/blob/master/README.rst#line_profiler