deshaw/jupyterlab-execute-time

Show duration of previous run.

stefansimik opened this issue · 1 comments

Hi,
it would be very useful to see duration of previous run.

Reason why this is useful:
We all have notebooks, where some cells are taking quite a long time and here is the situation:

  1. I click some long-running cell (like training ML model, which can take hours)
  2. Now I tell myself - "oh, this cell will be probably running for a long time. I could go to a shop, while this finishes. ...and how long did it run previously, so I can estimate it?
  3. And here is the PROBLEM- I would really need the information, how long the cell was running previous time, but one always forgets to check this information before running. It would be soo useful to know, but the information of previous run is lost forever.

So here is the complete idea for implementation:

  • when cell is run for the 1st time - it is the same as now:
    • Last executed at 2022-10-01 13:48:57 in 43.54s
  • when cell has previous run(s) - show duration of previous run
    • CELL RUNNING: Previous run: 2m 43s | Execution started at 2022-10-01 14:06:00
    • CELL FINISHED: Previous run: 2m 43s | Last executed at 2022-10-01 13:48:57 in 43.54s

The old information of previous run is on the left - to intuitively show it is old info from history.
The information about current run is on the right = the last information - to intuitively show, it is the latest new info.

**Very simple logic without any complexity: **

  • Always show the previous run info, if previous runs exist
  • Cell has no historical runs only when it was newly created right and has no runs.
  • Code changes in cell have no impact. Only the existence of previous runs matter.

It is useful and practical for many common scenarios

  • allows you to know/estimate, how long the cell will run from previous run. That way you can better estimate, how much time is needed till cell will be finished.
  • allows you to see simple performance improvements between runs (you change the code and see if the cell executed faster then previously)

Fixed vi #72 (see screencast).