summaryrefslogtreecommitdiff
path: root/obbench
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-07-16 14:08:37 +0300
committerLars Wirzenius <liw@liw.fi>2015-07-16 14:08:37 +0300
commitd71f879fff9a4de46228834f07106ca4a3502d9f (patch)
treec1f8c414f4c0140d2a28e5619b9fb544c3f9ff10 /obbench
parent320f70eb42ed12a3ad44919533c207f052f53ca6 (diff)
downloadobnam-benchmarks-d71f879fff9a4de46228834f07106ca4a3502d9f.tar.gz
Save results for eacn benchmark
Diffstat (limited to 'obbench')
-rwxr-xr-xobbench10
1 files changed, 5 insertions, 5 deletions
diff --git a/obbench b/obbench
index 8a84051..2ad91a1 100755
--- a/obbench
+++ b/obbench
@@ -47,7 +47,7 @@ class ObnamBenchmarker(cliapp.Application):
self.prepare_obnam(checkout)
for benchmark in spec.get('benchmarks', []):
result = self.run_one_benchmark(benchmark, tempdir, checkout)
- self.save_result(spec, result)
+ self.save_result(spec, benchmark, result)
def get_treeish(self, spec, treeish, tempdir):
checkout = os.path.join(tempdir, 'git')
@@ -124,16 +124,16 @@ class ObnamBenchmarker(cliapp.Application):
['./obnam', '--no-default-config'] + args,
cwd=checkout)
- def save_result(self, spec, result):
+ def save_result(self, spec, benchmark, result):
obj = result.as_dict()
- pathname = self.get_report_pathname(spec, result)
+ pathname = self.get_report_pathname(spec, benchmark, result)
with open(pathname, 'w') as f:
yaml.safe_dump(obj, stream=f, default_flow_style=False, indent=4)
- def get_report_pathname(self, spec, result):
+ def get_report_pathname(self, spec, benchmark, result):
return os.path.join(
spec['reports-dir'],
- result.get_commit_id() + '.yaml')
+ '%s_%s.yaml' % (result.get_commit_id(), benchmark['name']))
def generate_html(self, spec):
pass