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

auto detect time units in kernprof -v output #113

Open uweschmitt opened 6 years ago

uweschmitt commented 6 years ago

Output now looks like this:

line #      Hits            Time     Per Hit   % Time  Line Contents
====================================================================
    11                                                 @profile
    12                                                 def main():
    13         1        13.0[µs]    13.0[µs]      0.0      wait(0)
    14         1       102.1[ms]   102.1[ms]      8.5      wait(0.1)
    15         1         1.1[s]      1.1[s]      91.5      wait(1.1)
uweschmitt commented 6 years ago
Line #      Hits          Time   Per Hit   % Time  Line Contents
================================================================
    11                                             @profile
    12                                             def main():
    13         1        14.0µs    14.0µs      0.0      wait(0)
    14         1       100.7ms   100.7ms      8.4      wait(0.1)
    15         1         1.1s      1.1s      91.6      wait(1.1)