The hackbench test wasn't generating performance keyvals, due to some incorrect assumptions at the postprocessing code (the output for the test also has a debug line with the number of tasks spawned, so the output generated will not start with 'Time:', as the code assumes). Let's fix that problem.
Also, in order for people to apply their custom postprocessing to results (they might want to test out some 3rd party postprocessing script, for example), is allways good to keep record of the raw output generated by the test, per iteration. I plan on doing the same for the other benchmarks present on autotest. Updates from v1: * Updated the test to postprocess keyvals per iteration Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- client/tests/hackbench/hackbench.py | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/client/tests/hackbench/hackbench.py b/client/tests/hackbench/hackbench.py index e2d6e69..b2375ac 100644 --- a/client/tests/hackbench/hackbench.py +++ b/client/tests/hackbench/hackbench.py @@ -22,7 +22,7 @@ class hackbench(test.test): def initialize(self): self.job.require_gcc() - self.results = [] + self.results = None def run_once(self, num_groups=90): @@ -35,7 +35,7 @@ class hackbench(test.test): hackbench_bin = os.path.join(self.srcdir, 'hackbench') cmd = '%s %s' % (hackbench_bin, num_groups) raw_output = utils.system_output(cmd, retain_output=True) - self.results.append(raw_output) + self.results = raw_output path = os.path.join(self.resultsdir, 'raw_output_%s' % self.iteration) raw_output_file = open(path, 'w') @@ -43,13 +43,12 @@ class hackbench(test.test): raw_output_file.close() - def postprocess(self): + def postprocess_iteration(self): """ Pick up the results attribute and write it in the performance keyval. """ - for result in self.results: - lines = result.split('\n') - for line in lines: - if line.startswith('Time:'): - time_val = line.split()[1] - self.write_perf_keyval({'time': time_val}) + lines = self.results.split('\n') + for line in lines: + if line.startswith('Time:'): + time_val = line.split()[1] + self.write_perf_keyval({'time': time_val}) -- 1.6.6.1 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
