summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-08-07 20:32:40 +0300
committerLars Wirzenius <liw@liw.fi>2015-08-07 20:32:40 +0300
commite98c8bb03a864c7f4627f3daa93110af85feeb94 (patch)
treedcd93469da7fa651f4e3beac2c89bc2e96034af8
parente3a89e350816a5862f2c6fe492ca4eb1cc1c0b2a (diff)
downloadobnam-benchmarks-e98c8bb03a864c7f4627f3daa93110af85feeb94.tar.gz
Specify reference times in .yaml, report in .html
-rwxr-xr-xobbench9
-rw-r--r--test.yaml4
2 files changed, 10 insertions, 3 deletions
diff --git a/obbench b/obbench
index 1c0f3bd..b53053e 100755
--- a/obbench
+++ b/obbench
@@ -149,6 +149,7 @@ class ObnamBenchmarker(cliapp.Application):
funcs[action](tempdir, checkout, config, step_info)
ended = time.time()
step_info['duration'] = ended - started
+ step_info['reference'] = step.get('reference', 0)
result.add_step(step_info)
@@ -228,7 +229,7 @@ class ObnamBenchmarker(cliapp.Application):
f.write('<tr>\n')
for step in steps:
f.write(
- '<th>{action}</th>\n'.format(
+ '<th>{action} (ref)</th>\n'.format(
action=self.q(step['obnam'])))
f.write('</tr>\n')
@@ -244,9 +245,11 @@ class ObnamBenchmarker(cliapp.Application):
profile.write(step['profile'])
f.write(
- '<td><a href="{link}">{duration}</a></td>\n'.format(
+ '<td><a href="{link}">{duration}</a> '
+ '({ref})</td>\n'.format(
link=self.q(basename),
- duration=self.q('%.1f' % step['duration'])))
+ duration=self.q('%.1f' % step['duration']),
+ ref=step['reference']))
f.write('</tr>\n')
f.write('</table>\n')
diff --git a/test.yaml b/test.yaml
index af817ae..cc8b9be 100644
--- a/test.yaml
+++ b/test.yaml
@@ -7,13 +7,17 @@ benchmarks:
steps:
- live: exit 0
obnam: backup
+ reference: 42
- obnam: restore
+ reference: 42
- name: many_files
description: backup many small files
steps:
- live: genbackupdata . --create=10 --file-size=1
obnam: backup
+ reference: 42
- obnam: restore
+ reference: 42
- obnam: backup
reports_dir: /home/liw/obnam/benchmarks/test.dir/reports
html_dir: /home/liw/obnam/benchmarks/test.dir/html