pyxfem.core.exec_tools module
Code profiling utilities.
This module provides a singleton-style wrapper around Python’s built-in
cProfile and pstats modules to toggle and inspect profiling
data across code sections.
Created on Fri Dec 29 16:58:47 2023
@author: nchevaug
- class pyxfem.core.exec_tools.Profile[source]
Bases:
objectStatic controller for runtime performance profiling.
Wraps a global
cProfile.Profileinstance, allowing selective activation, deactivation, and reporting of cumulative execution statistics.- doprofile
Global toggle flag. When set to
False, all profiling calls are bypassed (default isTrue).- Type:
bool
- pr
Underlying profiler instance.
- Type:
cProfile.Profile
- doprofile = True
- pr = <cProfile.Profile object>