bemobil_mne.preproc.StepTimer#

class bemobil_mne.preproc.StepTimer(logger=None)[source]#

Bases: object

Record and log wall-clock durations of named pipeline steps.

Parameters:
loggerlogging.Logger | None

Logger used to emit per-step messages. Defaults to the module logger.

Attributes:
timingslist of dict

{"name": str, "duration_s": float} entries in insertion order.

__init__(logger=None)[source]#

Methods

__init__([logger])

format_summary()

Return a multi-line, human-readable summary of all step timings.

log_step(name, duration_s)

Record and log a single step duration.

Attributes

total_s

float: Total recorded duration across all steps.

format_summary()[source]#

Return a multi-line, human-readable summary of all step timings.

log_step(name, duration_s)[source]#

Record and log a single step duration.

Parameters:
namestr

Name of the step.

duration_sfloat

Duration of the step in seconds.

property total_s#

float: Total recorded duration across all steps.