qimpy.profiler.stopwatch

stopwatch(_func=None, *, name=None)

Decorator to wrap StopWatch around call to function. Without arguments, decorator @stopwatch uses __qualname__ of the function for StopWatch.name. To override this, use the decorator with a keyword-argument name i.e. @stopwatch(name=function_name).