1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 11:22:41 +01:00

framework/output: save classifiers in Result

Save classifiers at Result as well as Metric level. Reason: when
processing output, one might want to filter complete results, as well as
individual metrics. While it is in theory possible to get the
classifiers for a job by simply extracting the common classifiers
between all metrics, this fails when there are no metrics generated for
a job (note that one might still want to process the output in this
case, e.g. for the artifacts).
This commit is contained in:
Sergei Trofimov
2018-02-15 10:14:57 +00:00
committed by Marc Bonnici
parent c5659d51f1
commit 1e21bd2ca8
3 changed files with 24 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import logging
from copy import copy
from datetime import datetime
from wa.framework import pluginloader, signal, instruments
@@ -56,6 +57,10 @@ class Job(object):
else:
self.workload = self._workload_cache[self.id]
def set_output(self, output):
output.classifiers = copy(self.classifiers)
self.output = output
def initialize(self, context):
self.logger.info('Initializing job {} [{}]'.format(self.id, self.iteration))
with signal.wrap('WORKLOAD_INITIALIZED', self, context):