mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-03 20:02:39 +01:00
wa: Rename Instrumentation
to Instruments
To be maintain a consistent naming scheme, rename all instances of `Instrumentation` to `Instruments`
This commit is contained in:
@@ -76,7 +76,7 @@ class AgendaWorkloadEntry(AgendaEntry):
|
||||
self.workload_parameters = get_aliased_param(kwargs,
|
||||
['workload_parameters', 'workload_params', 'params'],
|
||||
default=OrderedDict())
|
||||
self.instrumentation = kwargs.pop('instrumentation', [])
|
||||
self.instruments = kwargs.pop('instruments', [])
|
||||
self.flash = kwargs.pop('flash', OrderedDict())
|
||||
self.classifiers = kwargs.pop('classifiers', OrderedDict())
|
||||
if kwargs:
|
||||
@@ -103,7 +103,7 @@ class AgendaSectionEntry(AgendaEntry):
|
||||
self.workload_parameters = get_aliased_param(kwargs,
|
||||
['workload_parameters', 'workload_params'],
|
||||
default=OrderedDict())
|
||||
self.instrumentation = kwargs.pop('instrumentation', [])
|
||||
self.instruments = kwargs.pop('instruments', [])
|
||||
self.flash = kwargs.pop('flash', OrderedDict())
|
||||
self.classifiers = kwargs.pop('classifiers', OrderedDict())
|
||||
self.workloads = []
|
||||
@@ -136,7 +136,7 @@ class AgendaGlobalEntry(AgendaEntry):
|
||||
self.workload_parameters = get_aliased_param(kwargs,
|
||||
['workload_parameters', 'workload_params'],
|
||||
default=OrderedDict())
|
||||
self.instrumentation = kwargs.pop('instrumentation', [])
|
||||
self.instruments = kwargs.pop('instruments', [])
|
||||
self.flash = kwargs.pop('flash', OrderedDict())
|
||||
self.classifiers = kwargs.pop('classifiers', OrderedDict())
|
||||
if kwargs:
|
||||
|
@@ -557,7 +557,7 @@ class MetaConfiguration(Configuration):
|
||||
'wa.commands',
|
||||
'wa.framework.getters',
|
||||
'wa.framework.target.descriptor',
|
||||
'wa.instrumentation',
|
||||
'wa.instruments',
|
||||
'wa.output_processors',
|
||||
'wa.workloads',
|
||||
]
|
||||
|
@@ -23,7 +23,7 @@ def _format_yaml_comment(param, short_description=False):
|
||||
|
||||
def _format_instruments(output):
|
||||
plugin_cache = PluginCache()
|
||||
output.write("instrumentation:\n")
|
||||
output.write("instruments:\n")
|
||||
for plugin in DEFAULT_INSTRUMENTS:
|
||||
plugin_cls = plugin_cache.loader.get_plugin_class(plugin)
|
||||
output.writelines(_format_yaml_comment(plugin_cls, short_description=True))
|
||||
|
@@ -208,10 +208,10 @@ def _load_file(filepath, error_name):
|
||||
|
||||
def merge_augmentations(raw):
|
||||
"""
|
||||
Since, from configuration perspective, output processors and instrumens are
|
||||
Since, from configuration perspective, output processors and instruments are
|
||||
handled identically, the configuration entries are now interchangeable. E.g. it is
|
||||
now valid to specify a output processor in instrumentation list. This is to make things
|
||||
eassier for the users, as, from their perspective, the distinction is somewhat arbitrary.
|
||||
now valid to specify a output processor in an instruments list. This is to make things
|
||||
easier for the users, as, from their perspective, the distinction is somewhat arbitrary.
|
||||
|
||||
For backwards compatibility, both entries are still valid, and this
|
||||
function merges them together into a single "augmentations" set, ensuring
|
||||
@@ -265,7 +265,7 @@ def _construct_valid_entry(raw, seen_ids, prefix, jobs_config):
|
||||
else:
|
||||
workload_entry['id'] = raw.pop('id')
|
||||
|
||||
# Process instrumentation
|
||||
# Process instruments
|
||||
merge_augmentations(raw)
|
||||
|
||||
# Validate all workload_entry
|
||||
|
@@ -20,7 +20,7 @@ from copy import copy
|
||||
from datetime import datetime
|
||||
|
||||
import wa.framework.signal as signal
|
||||
from wa.framework import instrumentation
|
||||
from wa.framework import instruments
|
||||
from wa.framework.configuration.core import Status
|
||||
from wa.framework.exception import HostError, WorkloadError
|
||||
from wa.framework.job import Job
|
||||
@@ -300,10 +300,10 @@ class Executor(object):
|
||||
output.write_job_specs(config_manager.job_specs)
|
||||
output.write_state()
|
||||
|
||||
self.logger.info('Installing instrumentation')
|
||||
self.logger.info('Installing instruments')
|
||||
for instrument in config_manager.get_instruments(self.target_manager.target):
|
||||
instrumentation.install(instrument, context)
|
||||
instrumentation.validate()
|
||||
instruments.install(instrument, context)
|
||||
instruments.validate()
|
||||
|
||||
self.logger.info('Installing output processors')
|
||||
pm = ProcessorManager()
|
||||
|
@@ -78,7 +78,7 @@ stop method::
|
||||
|
||||
The generated output can be updated inside update_output, or if it is trace, we
|
||||
just pull the file to the host device. context has an output variable which
|
||||
has add_metric method. It can be used to add the instrumentation results metrics
|
||||
has add_metric method. It can be used to add the instruments results metrics
|
||||
to the final result for the workload. The method can be passed 4 params, which
|
||||
are metric key, value, unit and lower_is_better, which is a boolean. ::
|
||||
|
||||
@@ -90,7 +90,7 @@ are metric key, value, unit and lower_is_better, which is a boolean. ::
|
||||
# parse the file if needs to be parsed, or add result to
|
||||
# context.result
|
||||
|
||||
At the end, we might want to delete any files generated by the instrumentation
|
||||
At the end, we might want to delete any files generated by the instruments
|
||||
and the code to clear these file goes in teardown method. ::
|
||||
|
||||
def teardown(self, context):
|
||||
@@ -111,7 +111,7 @@ from wa.utils.misc import isiterable
|
||||
from wa.utils.types import identifier, enum, level
|
||||
|
||||
|
||||
logger = logging.getLogger('instrumentation')
|
||||
logger = logging.getLogger('instruments')
|
||||
|
||||
|
||||
# Maps method names onto signals the should be registered to.
|
||||
@@ -121,7 +121,7 @@ logger = logging.getLogger('instrumentation')
|
||||
# in the documentation
|
||||
SIGNAL_MAP = OrderedDict([
|
||||
# Below are "aliases" for some of the more common signals to allow
|
||||
# instrumentation to have similar structure to workloads
|
||||
# instruments to have similar structure to workloads
|
||||
('initialize', signal.RUN_INITIALIZED),
|
||||
('setup', signal.BEFORE_WORKLOAD_SETUP),
|
||||
('start', signal.BEFORE_WORKLOAD_EXECUTION),
|
||||
@@ -403,7 +403,7 @@ def get_disabled():
|
||||
|
||||
class Instrument(Plugin):
|
||||
"""
|
||||
Base class for instrumentation implementations.
|
||||
Base class for instrument implementations.
|
||||
"""
|
||||
kind = "instrument"
|
||||
|
@@ -2,7 +2,7 @@ import logging
|
||||
|
||||
from wa.framework import pluginloader
|
||||
from wa.framework.exception import ConfigError
|
||||
from wa.framework.instrumentation import is_installed
|
||||
from wa.framework.instruments import is_installed
|
||||
from wa.framework.plugin import Plugin
|
||||
from wa.utils.log import log_error, indent, dedent
|
||||
|
||||
|
@@ -224,12 +224,12 @@ def connect(handler, signal, sender=dispatcher.Any, priority=0):
|
||||
:handler: This can be any callable that that takes the right arguments for
|
||||
the signal. For most signals this means a single argument that
|
||||
will be an ``ExecutionContext`` instance. But please see documentation
|
||||
for individual signals in the :ref:`signals reference <instrumentation_method_map>`.
|
||||
for individual signals in the :ref:`signals reference <instruments_method_map>`.
|
||||
:signal: The signal to which the handler will be subscribed. Please see
|
||||
:ref:`signals reference <instrumentation_method_map>` for the list of standard WA
|
||||
:ref:`signals reference <instruments_method_map>` for the list of standard WA
|
||||
signals.
|
||||
|
||||
.. note:: There is nothing that prevents instrumentation from sending their
|
||||
.. note:: There is nothing that prevents instruments from sending their
|
||||
own signals that are not part of the standard set. However the signal
|
||||
must always be an :class:`wa.core.signal.Signal` instance.
|
||||
|
||||
@@ -242,7 +242,7 @@ def connect(handler, signal, sender=dispatcher.Any, priority=0):
|
||||
Defaults to 0.
|
||||
|
||||
.. note:: Priorities for some signals are inverted (so highest priority
|
||||
handlers get executed last). Please see :ref:`signals reference <instrumentation_method_map>`
|
||||
handlers get executed last). Please see :ref:`signals reference <instruments_method_map>`
|
||||
for details.
|
||||
|
||||
"""
|
||||
|
Reference in New Issue
Block a user