timing_module#

Module: fridom.framework.timing_module

Classes

TimingComponent(name)

Keep track of the time spent in a particular component of the model.

TimingModule()

Container class for TimingComponent objects.

timing_module.py - Keep track of the time spent in different model components.

class fridom.framework.timing_module.TimingComponent(name: str)[source]#

Bases: object

Keep track of the time spent in a particular component of the model.

start() None[source]#

Start the timer.

stop() None[source]#

Stop the timer.

reset() None[source]#

Reset the timer.

class fridom.framework.timing_module.TimingModule[source]#

Bases: object

Container class for TimingComponent objects.

add_component(name: str) None[source]#

Add a new TimingComponent to the TimingModule.

Arguments:

name (str): name of the new component

get(name: str) TimingComponent[source]#

Get the TimingComponent with the given name.

If the component is not found, add a new component with the given name.

Arguments:

name (str): name of the component to get

reset() None[source]#

Reset all TimingComponents.