HomeClusterLabs Projects

Refactor: python, cts: Add a Timer class with a context manager.

Description

Refactor: python, cts: Add a Timer class with a context manager.

This can be used anywhere we set_timer, do something, log_timer. It
can't really be used where we return midway through on failure because
in those cases we don't want to log anything.

Additionally, change the timer-related functions in CTSTest to handle
the new type and make the timers dict private.

Details

Provenance
clumensAuthored on Apr 19 2023, 9:42 AM
Parents
rP966ec41b7854: Refactor: python: Define OCFS-related attributes in __init__.
Branches
Unknown
Tags
Unknown