.. _jgdv.debugging.timing: ===================== jgdv.debugging.timing ===================== .. py:module:: jgdv.debugging.timing .. autoapi-nested-parse:: See EOF for license/metadata/notes as applicable Classes ------- .. autoapisummary:: jgdv.debugging.timing.TimeCtx jgdv.debugging.timing.TimeDec Module Contents =============== .. _jgdv.debugging.timing.TimeCtx: .. py:class:: TimeCtx(*, logger = None, level = logmod.INFO, group = None) Utility Class to time code execution. .. py:method:: _set_name(name) -> .. py:method:: msg(msg, *args) -> .. py:attribute:: _logger :type: jgdv.Maybe[logging.Logger] .. py:attribute:: _start :type: int .. py:attribute:: _stop :type: int .. py:attribute:: group :type: str .. py:attribute:: level :type: int .. py:attribute:: total :type: int .. py:attribute:: total_ms :type: float .. py:attribute:: total_s :type: float .. _jgdv.debugging.timing.TimeDec: .. py:class:: TimeDec(*, cache = None, logger = None, level = None, **kwargs) Bases: :py:obj:`jgdv.decorators.MonotonicDec` Decorate a callable to track its timing .. py:method:: _wrap_fn_h(fn) -> override this to add a decorator to a function .. py:method:: _wrap_method_h(fn) -> Override this to add a decoration function to method .. py:attribute:: _cache :type: jgdv.Maybe[pathlib.Path] .. py:attribute:: _level :value: None .. py:attribute:: _logger :type: jgdv.Maybe[logging.Logger]