diff --git a/wa/__init__.py b/wa/__init__.py index af433f0d..900fa0f0 100644 --- a/wa/__init__.py +++ b/wa/__init__.py @@ -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, diff --git a/wa/commands/create.py b/wa/commands/create.py index 011d6856..4e9a5e78 100644 --- a/wa/commands/create.py +++ b/wa/commands/create.py @@ -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: diff --git a/wa/commands/run.py b/wa/commands/run.py index 6b956492..1334df3a 100644 --- a/wa/commands/run.py +++ b/wa/commands/run.py @@ -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 diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index f1f32a0e..d8293f9a 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -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) diff --git a/wa/framework/configuration/execution.py b/wa/framework/configuration/execution.py index 2689c9e5..46aa8ba3 100644 --- a/wa/framework/configuration/execution.py +++ b/wa/framework/configuration/execution.py @@ -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 diff --git a/wa/framework/configuration/parsers.py b/wa/framework/configuration/parsers.py index 00d433ff..a5c5be69 100644 --- a/wa/framework/configuration/parsers.py +++ b/wa/framework/configuration/parsers.py @@ -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 diff --git a/wa/framework/exception.py b/wa/framework/exception.py index 6f1f0693..6f8f33fd 100644 --- a/wa/framework/exception.py +++ b/wa/framework/exception.py @@ -48,8 +48,8 @@ class InstrumentError(WAError): pass -class ResultProcessorError(WAError): - """General ResultProcessor error.""" +class OutputProcessorError(WAError): + """General OutputProcessor error.""" pass @@ -135,7 +135,7 @@ class WorkerThreadError(WAError): orig = self.exc_info[1] orig_name = type(orig).__name__ text = 'Exception of type {} occured on thread {}:\n{}\n{}: {}' - message = text.format(orig_name, thread, get_traceback(self.exc_info), + message = text.format(orig_name, thread, get_traceback(self.exc_info), orig_name, orig) super(WorkerThreadError, self).__init__(message) diff --git a/wa/framework/execution.py b/wa/framework/execution.py index f4367061..b121eda9 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -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) diff --git a/wa/framework/output.py b/wa/framework/output.py index fe8a338b..fecff36b 100644 --- a/wa/framework/output.py +++ b/wa/framework/output.py @@ -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. diff --git a/wa/framework/processor.py b/wa/framework/output_processor.py similarity index 92% rename from wa/framework/processor.py rename to wa/framework/output_processor.py index 2273ba50..3713efca 100644 --- a/wa/framework/processor.py +++ b/wa/framework/output_processor.py @@ -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) diff --git a/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/ActionLogger.java b/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/ActionLogger.java index aba8bb26..b0d1fbfa 100644 --- a/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/ActionLogger.java +++ b/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/ActionLogger.java @@ -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 diff --git a/wa/processors/__init__.py b/wa/output_processors/__init__.py similarity index 100% rename from wa/processors/__init__.py rename to wa/output_processors/__init__.py diff --git a/wa/processors/csvproc.py b/wa/output_processors/csvproc.py similarity index 97% rename from wa/processors/csvproc.py rename to wa/output_processors/csvproc.py index 825df995..9a90006e 100644 --- a/wa/processors/csvproc.py +++ b/wa/output_processors/csvproc.py @@ -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 = """ diff --git a/wa/processors/status.py b/wa/output_processors/status.py similarity index 96% rename from wa/processors/status.py rename to wa/output_processors/status.py index 00b6178e..f284f86b 100644 --- a/wa/processors/status.py +++ b/wa/output_processors/status.py @@ -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 diff --git a/wa/processors/targz.py b/wa/output_processors/targz.py similarity index 96% rename from wa/processors/targz.py rename to wa/output_processors/targz.py index d36a7d11..caf427e0 100644 --- a/wa/processors/targz.py +++ b/wa/output_processors/targz.py @@ -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' diff --git a/wa/processors/uxperf.py b/wa/output_processors/uxperf.py similarity index 95% rename from wa/processors/uxperf.py rename to wa/output_processors/uxperf.py index f2c2f492..90ba45b9 100644 --- a/wa/processors/uxperf.py +++ b/wa/output_processors/uxperf.py @@ -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'