pcdsutils.profile.setup_profiler
- pcdsutils.profile.setup_profiler(module_names: Iterable[str], use_global_profiler: bool = True) LineProfiler[source]
Sets up a profiler.
Includes all functions and classes from all submodules of the given module names.
- Parameters:
- module_namesiterable of str
The modules to profile. You can make this an entire module like “typhos”, specific submodules like “typhos.display”, or several modules if you want to profile many different things.
- use_global_profilerbool, optional
Set to True, the default, to set up a global profiler. Set to False to set up an independent profiler.
- Returns:
- profilerLineProfiler
The profiler that was just set up, global or otherwise.