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

wa: Rename update_results reference to update_output

To be consistant with the rename of output_processors, old references
to `update_results` have now been changed to `update_output`.
This commit is contained in:
Marc Bonnici
2018-01-10 14:37:13 +00:00
committed by setrofim
parent 538cd8d332
commit 987f4ec4f1
9 changed files with 19 additions and 19 deletions

View File

@@ -38,8 +38,8 @@ Hence, the following methods are sufficient to implement to add new instrument:
where instrument measures start being registered/taken.
- stop: It is invoked just after the workload execution stops. The measures
should stop being taken/registered.
- update_result: It is invoked after the workload updated its result.
update_result is where the taken measures are added to the result so it
- update_output: It is invoked after the workload updated its result.
update_output is where the taken measures are added to the output so it
can be processed by Workload Automation.
- teardown is invoked after the workload is teared down. It is a good place
to clean any logs generated by the instrument.
@@ -76,13 +76,13 @@ stop method::
def stop(self, context):
self.device.execute('{} stop'.format(self.trace_on_device))
The generated result can be updated inside update_result, or if it is trace, we
just pull the file to the host device. context has a result variable which
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
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. ::
def update_result(self, context):
def update_output(self, context):
# pull the trace file to the device
result = os.path.join(self.device.working_directory, 'trace.txt')
self.device.pull(result, context.working_directory)
@@ -127,7 +127,7 @@ SIGNAL_MAP = OrderedDict([
('start', signal.BEFORE_WORKLOAD_EXECUTION),
('stop', signal.AFTER_WORKLOAD_EXECUTION),
('process_workload_output', signal.SUCCESSFUL_WORKLOAD_OUTPUT_UPDATE),
('update_result', signal.AFTER_WORKLOAD_OUTPUT_UPDATE),
('update_output', signal.AFTER_WORKLOAD_OUTPUT_UPDATE),
('teardown', signal.AFTER_WORKLOAD_TEARDOWN),
('finalize', signal.RUN_FINALIZED),
@@ -321,7 +321,7 @@ def install(instrument, context):
raise ValueError(message.format(attr_name, arg_num))
priority = get_priority(attr)
logger.debug('\tConnecting %s to %s with priority %s(%d)', attr.__name__,
logger.debug('\tConnecting %s to %s with priority %s(%d)', attr.__name__,
SIGNAL_MAP[attr_name], priority.name, priority.value)
mc = ManagedCallback(instrument, attr)