Closed valerio-marra closed 3 years ago
Hi @valerio-marra,
Allowing configuration of IPython extensions upon %load_ext
is not trivial and a bit controversial (ref https://github.com/ipython/ipython/issues/6888).
I would argue it's a feature of this extension to always output a delta, whether the cell succeeds, crashes, takes little or lots of time.
If you're feeling like forking for personal purposes, you could simply use a global variable or a class attribute (in seconds):
def stop(self):
delta = monotonic() - self.start_time
- print(u'time: {}'.format(format_delta(delta)))
+ if delta >= DELTA_THRESHOLD:
+ print(u'time: {}'.format(format_delta(delta)))
thanks!
I would find it useful to display the time a cell took only when this time is above a threshold. This would make the notebook cleaner as one may be interested only in computationally intensive cells.