1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 03:12:34 +01:00

Adding instrument_is_enabled function

As instrumentation can be enabled/disabled for a specfic workload
execution, it is sometimes not enough to verify that an instrument has
been installed for the run; one might need to check whether it is
currently enabled.
This commit is contained in:
Sergei Trofimov
2015-05-28 10:13:50 +01:00
parent a254a44f0e
commit 777003ed51
3 changed files with 31 additions and 1 deletions

View File

@@ -23,5 +23,13 @@ def instrument_is_installed(instrument):
return instrumentation.is_installed(instrument)
def instrument_is_enabled(instrument):
"""Returns ``True`` if the specified instrument is installed and is currently
enabled, and ``False`` other wise. The insturment maybe specified either
as a name or a subclass (or instance of subclass) of
:class:`wlauto.core.Instrument`."""
return instrumentation.is_enabled(instrument)
def clear_instrumentation():
instrumentation.installed = []