1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

wa: Rename results_processors to output_processors

For clarity and to better reflect their purpose, rename
`results_processors` to `output_processors`.
This commit is contained in:
Marc Bonnici 2018-01-12 15:22:11 +00:00 committed by setrofim
parent a688c9120e
commit 538cd8d332
16 changed files with 42 additions and 42 deletions

View File

@ -3,7 +3,7 @@ from wa.framework.command import Command, ComplexCommand, SubCommand
from wa.framework.configuration import settings
from wa.framework.configuration.core import Status
from wa.framework.exception import HostError, JobError, InstrumentError, ConfigError
from wa.framework.exception import (ResultProcessorError, ResourceError,
from wa.framework.exception import (OutputProcessorError, ResourceError,
CommandError, ToolError)
from wa.framework.exception import (WAError, NotFoundError, ValidationError,
WorkloadError)
@ -12,7 +12,7 @@ from wa.framework.instrumentation import (Instrument, very_slow, slow, normal, f
very_fast)
from wa.framework.output import RunOutput, discover_wa_outputs
from wa.framework.plugin import Plugin, Parameter
from wa.framework.processor import ResultProcessor
from wa.framework.output_processor import OutputProcessor
from wa.framework.resource import (NO_ONE, JarFile, ApkFile, ReventFile, File,
Executable)
from wa.framework.workload import (Workload, ApkWorkload, ApkUiautoWorkload,

View File

@ -36,7 +36,7 @@ class CreateAgendaSubcommand(SubCommand):
def execute(self, state, args):
agenda = OrderedDict()
agenda['config'] = OrderedDict(instrumentation=[], result_processors=[])
agenda['config'] = OrderedDict(instrumentation=[], output_processors=[])
agenda['global'] = OrderedDict(iterations=args.iterations)
agenda['workloads'] = []
target_desc = None
@ -65,8 +65,8 @@ class CreateAgendaSubcommand(SubCommand):
else:
if extcls.kind == 'instrument':
agenda['config']['instrumentation'].append(name)
if extcls.kind == 'result_processor':
agenda['config']['result_processors'].append(name)
if extcls.kind == 'output_processor':
agenda['config']['output_processors'].append(name)
agenda['config'][name] = config
if args.output:

View File

@ -74,7 +74,7 @@ class RunCommand(Command):
self.parser.add_argument('--disable', action='append', dest='augmentations_to_disable',
default=[],
metavar='INSTRUMENT', help="""
Specify an instrument or result processor to
Specify an instrument or output processor to
disable from the command line. This equivalent
to adding "~{metavar}" to the instrumentation
list in the agenda. This can be used to

View File

@ -558,7 +558,7 @@ class MetaConfiguration(Configuration):
'wa.framework.getters',
'wa.framework.target.descriptor',
'wa.instrumentation',
'wa.processors',
'wa.output_processors',
'wa.workloads',
]
@ -793,7 +793,7 @@ class RunConfiguration(Configuration):
'''
),
ConfigurationPoint(
'result_processors',
'output_processors',
kind=toggle_set,
default=['csv', 'status'],
description='''
@ -891,14 +891,14 @@ class JobSpec(Configuration):
Similar to IDs but do not have the uniqueness restriction.
If specified, labels will be used by some result
processes instead of (or in addition to) the workload
name. For example, the csv result processor will put
name. For example, the csv output processor will put
the label in the "workload" column of the CSV file.
'''),
ConfigurationPoint('augmentations', kind=toggle_set, merge=True,
aliases=["instruments", "processors", "instrumentation",
"result_processors", "augment"],
"output_processors", "augment", "result_processor"],
description='''
The instruments and result processors to enable (or
The instruments and output processors to enable (or
disabled using a ~) during this workload spec. This combines the
"instrumentation" and "result_processors" from
previous versions of WA (the old entries are now
@ -1073,7 +1073,7 @@ class JobGenerator(object):
msg = "'enabled_instruments' cannot be updated after it has been accessed"
raise RuntimeError(msg)
self._enabled_instruments.add(entry)
elif entry_cls.kind == 'result_processor':
elif entry_cls.kind == 'output_processor':
if self._read_enabled_processors:
msg = "'enabled_processors' cannot be updated after it has been accessed"
raise RuntimeError(msg)

View File

@ -98,9 +98,9 @@ class ConfigManager(object):
processors = []
for name in self.enabled_processors:
try:
proc = self.plugin_cache.get_plugin(name, kind='result_processor')
proc = self.plugin_cache.get_plugin(name, kind='output_processor')
except NotFoundError:
msg = 'Result processor "{}" not found'
msg = 'Output Processor "{}" not found'
raise NotFoundError(msg.format(name))
processors.append(proc)
return processors

View File

@ -208,9 +208,9 @@ def _load_file(filepath, error_name):
def merge_augmentations(raw):
"""
Since, from configuration perspective, result processors and instrumens are
Since, from configuration perspective, output processors and instrumens are
handled identically, the configuration entries are now interchangeable. E.g. it is
now valid to specify a result processor in instrumentation list. This is to make things
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.
For backwards compatibility, both entries are still valid, and this

View File

@ -48,8 +48,8 @@ class InstrumentError(WAError):
pass
class ResultProcessorError(WAError):
"""General ResultProcessor error."""
class OutputProcessorError(WAError):
"""General OutputProcessor error."""
pass

View File

@ -25,7 +25,7 @@ from wa.framework.configuration.core import Status
from wa.framework.exception import HostError, WorkloadError
from wa.framework.job import Job
from wa.framework.output import init_job_output
from wa.framework.processor import ProcessorManager
from wa.framework.output_processor import ProcessorManager
from wa.framework.resource import ResourceResolver
from wa.framework.target.manager import TargetManager
from wa.utils import log
@ -253,7 +253,7 @@ class Executor(object):
The initial context set up involves combining configuration from various
sources, loading of requided workloads, loading and installation of
instruments and result processors, etc. Static validation of the combined
instruments and output processors, etc. Static validation of the combined
configuration is also performed.
"""
@ -305,7 +305,7 @@ class Executor(object):
instrumentation.install(instrument, context)
instrumentation.validate()
self.logger.info('Installing result processors')
self.logger.info('Installing output processors')
pm = ProcessorManager()
for proc in config_manager.get_processors():
pm.install(proc, context)

View File

@ -286,20 +286,20 @@ class Artifact(object):
"""
This is an artifact generated during execution/post-processing of a
workload. Unlike metrics, this represents an actual artifact, such as a
file, generated. This may be "result", such as trace, or it could be "meta
file, generated. This may be "output", such as trace, or it could be "meta
data" such as logs. These are distinguished using the ``kind`` attribute,
which also helps WA decide how it should be handled. Currently supported
kinds are:
:log: A log file. Not part of "results" as such but contains
:log: A log file. Not part of the "output" as such but contains
information about the run/workload execution that be useful for
diagnostics/meta analysis.
:meta: A file containing metadata. This is not part of "results", but
:meta: A file containing metadata. This is not part of the "output", but
contains information that may be necessary to reproduce the
results (contrast with ``log`` artifacts which are *not*
necessary).
:data: This file contains new data, not available otherwise and should
be considered part of the "results" generated by WA. Most traces
be considered part of the "output" generated by WA. Most traces
would fall into this category.
:export: Exported version of results or some other artifact. This
signifies that this artifact does not contain any new data
@ -325,7 +325,7 @@ class Artifact(object):
.. note: The kind parameter is intended to represent the logical
function of a particular artifact, not it's intended means of
processing -- this is left entirely up to the result
processing -- this is left entirely up to the output
processors.
"""
@ -344,7 +344,7 @@ class Artifact(object):
using ``/`` irrespective of the
operating system.
:param kind: The type of the artifact this is (e.g. log file, result,
etc.) this will be used a hit to result processors. This
etc.) this will be used as a hint to output processors. This
must be one of ``'log'``, ``'meta'``, ``'data'``,
``'export'``, ``'raw'``.
:param description: A free-form description of what this artifact is.

View File

@ -7,13 +7,13 @@ from wa.framework.plugin import Plugin
from wa.utils.log import log_error, indent, dedent
class ResultProcessor(Plugin):
class OutputProcessor(Plugin):
kind = 'result_processor'
kind = 'output_processor'
requires = []
def validate(self):
super(ResultProcessor, self).validate()
super(OutputProcessor, self).validate()
for instrument in self.requires:
if not is_installed(instrument):
msg = 'Instrument "{}" is required by {}, but is not installed.'
@ -34,8 +34,8 @@ class ProcessorManager(object):
self.processors = []
def install(self, processor, context):
if not isinstance(processor, ResultProcessor):
processor = self.loader.get_result_processor(processor)
if not isinstance(processor, OutputProcessor):
processor = self.loader.get_output_processor(processor)
self.logger.debug('Installing {}'.format(processor.name))
processor.logger.context = context
self.processors.append(processor)

View File

@ -22,7 +22,7 @@ import android.util.Log;
* deliminating and timing actions. Markers are output to logcat with debug
* priority. Actions represent a series of UI interactions to time.
*
* The marker API provides a way for instruments and result processors to hook into
* The marker API provides a way for instruments and output processors to hook into
* per-action timings by parsing logcat logs produced per workload iteration.
*
* The marker output consists of a logcat tag 'UX_PERF' and a message. The

View File

@ -1,11 +1,11 @@
import csv
from wa import ResultProcessor, Parameter
from wa import OutputProcessor, Parameter
from wa.framework.exception import ConfigError
from wa.utils.types import list_of_strings
class CsvReportProcessor(ResultProcessor):
class CsvReportProcessor(OutputProcessor):
name = 'csv'
description = """

View File

@ -18,11 +18,11 @@
import time
from collections import Counter
from wa import ResultProcessor, Status
from wa import OutputProcessor, Status
from wa.utils.misc import write_table
class StatusTxtReporter(ResultProcessor):
class StatusTxtReporter(OutputProcessor):
name = 'status'
description = """
Outputs a txt file containing general status information about which runs

View File

@ -1,11 +1,11 @@
import shutil
import tarfile
from wa import ResultProcessor, Parameter
from wa import OutputProcessor, Parameter
from wa.framework import signal
class TargzProcessor(ResultProcessor):
class TargzProcessor(OutputProcessor):
name = 'targz'

View File

@ -1,9 +1,9 @@
from wa import ResultProcessor
from wa import OutputProcessor
from wa.utils.android import LogcatParser
class UxperfProcessor(ResultProcessor):
class UxperfProcessor(OutputProcessor):
name = 'uxperf'