TimeWatcher
The TimeWatcher
monitors the execution time of the command/function.
It can be created using the capsula.TimeWatcher.__init__
method.
capsula.TimeWatcher.__init__
PARAMETER | DESCRIPTION |
---|---|
name |
Name of the time watcher. Used as a key in the output.
TYPE:
|
Configuration example
Via capsula.toml
Via @capsula.watcher
decorator
import capsula
@capsula.run()
@capsula.watcher(capsula.TimeWatcher("calculation_time"))
def func(): ...
Output example
The following is an example of the output of the TimeWatcher
, reported by the JsonDumpReporter
: