jgdv.debugging.timing
See EOF for license/metadata/notes as applicable
Classes
Utility Class to time code execution. |
|
Decorate a callable to track its timing |
Module Contents
- class jgdv.debugging.timing.TimeCtx(
- *,
- logger=None,
- level=logmod.INFO,
- group=None,
Utility Class to time code execution.
- Parameters:
logger (jgdv.Maybe[logging.Logger | Literal[False]])
level (int)
group (jgdv.Maybe[str])
- _logger: jgdv.Maybe[logging.Logger]
- class jgdv.debugging.timing.TimeDec(
- *,
- cache=None,
- logger=None,
- level=None,
- **kwargs,
Bases:
jgdv.decorators.MonotonicDecDecorate a callable to track its timing
- Parameters:
cache (jgdv.Maybe[pathlib.Path])
logger (jgdv.Maybe[logging.Logger | Literal[False]])
level (jgdv.Maybe[int])
kwargs (Any)
- _wrap_fn_h(fn) <Unknown>[source]
override this to add a decorator to a function
- Parameters:
fn (jgdv.Func[TimeDec._wrap_fn_h.I, TimeDec._wrap_fn_h.O])
- Return type:
jgdv.Func[TimeDec._wrap_fn_h.I, TimeDec._wrap_fn_h.O]
- _wrap_method_h(fn) <Unknown>[source]
Override this to add a decoration function to method
- Parameters:
fn (jgdv.Func[TimeDec._wrap_method_h.I, TimeDec._wrap_method_h.O])
- Return type:
jgdv.Func[TimeDec._wrap_method_h.I, TimeDec._wrap_method_h.O]
- _cache: jgdv.Maybe[pathlib.Path]
- _level = None
- _logger: jgdv.Maybe[logging.Logger]