-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
I'm using an IDE with REPL and execute many lines of code individually. Sometimes I would quickly like to assess which lines in some multi-line codes are slowest
How difficult would it be to integrate line_profiler as a context manager, without manual overhead of wrapping the statement in a function? This would be similar to the ipython cell magic, but without the cell
Something along those lines:
with lineprofiler:
func()
func2()
func3()
#>L1 func() - 0.200s - 20%
#>L2 func2() - 0.450s - 45%
#>L3 func3() - 0.350s - 35%related #127, it seems like this was possible (?) in Python 2. Is there a reason it is not working anymore in Python 3?
Metadata
Metadata
Assignees
Labels
No labels