TotalDepth.util.ExecTimer (Timing Code Execution)¶
Has classes for timing execution
-
exception
TotalDepth.util.ExecTimer.
ExceptionExecTimer
¶ Specialisation of exception for this module.
-
class
TotalDepth.util.ExecTimer.
Timer
(description: str)¶ Records the timing of a single event.
-
__init__
(description: str)¶ Initialize self. See help(type(self)) for accurate signature.
-
stop
(work_done: int = 0) → None¶ Stop the timer and record how much work was done.
-
add_work_done
(work_done: int) → None¶ Adds work done.
-
elapsed_perf_counter
¶ Executions time in seconds as seen by a wall clock.
-
elapsed_wall_clock
¶ Executions time in seconds as seen by a wall clock.
-
__str__
() → str¶ Return str(self).
-
ms_mb
¶ Return the work rate in ms/MB.
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
TotalDepth.util.ExecTimer.
TimerList
¶ Maintains a list of execution time objects
-
__init__
()¶ Constructor
-
__len__
() → int¶ Number of task timers.
-
add_timer
(description: str) → None¶ Load a new task timer starting right now.
-
timer
¶ The current timer.
-
has_active_timer
¶ True if there is a running timer, False if there are either no timers or the latest timer is halted.
-
stop
(work_done=0) → None¶ Stop current timer.
-
__str__
()¶ Return str(self).
-
__weakref__
¶ list of weak references to the object (if defined)
-