Closed jkterry1 closed 6 years ago
Are you trying to do line-profiling or regular function-profiling?
Well, since your example has no function calls inside the @profile
d 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
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.