diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-08-07 21:15:18 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-08-07 21:15:18 +0300 |
commit | 10d8dad6941b1aaa952b86a4a88cc6c67057ee14 (patch) | |
tree | e54ad0521833828d4a36003980cd0ef5467a5c05 | |
parent | 282901720ab62ea66105aa1e8759cd6ae6191d1e (diff) | |
download | obnam-benchmarks-10d8dad6941b1aaa952b86a4a88cc6c67057ee14.tar.gz |
More fixes for getting reference times from spec
-rwxr-xr-x | obbench | 9 | ||||
-rw-r--r-- | test.yaml | 8 |
2 files changed, 10 insertions, 7 deletions
@@ -320,7 +320,12 @@ class ObnamBenchmarker(cliapp.Application): commit=self.q(run['commit_id']), name=self.q(name)) duration = '%.1f' % run['durations'][name] - reference = '%.0f' % run['references'][name] + + reference = sum( + sum(x.get('reference', 0) for x in b['steps']) + for b in spec['benchmarks'] + if b['name'] == name) + f.write( '<td class="duration">' '<a href="{link}">{duration}</a> ' @@ -366,11 +371,9 @@ class ObnamBenchmarker(cliapp.Application): 'commit_id': obj['commit_id'], 'commit_msg': obj['commit_msg'], 'durations': { obj['name']: total(obj, 'duration') }, - 'references': { obj['name']: total(obj, 'reference') }, }) else: runs[-1]['durations'][obj['name']] = total(obj, 'duration') - runs[-1]['references'][obj['name']] = total(obj, 'reference') return runs @@ -7,17 +7,17 @@ benchmarks: steps: - live: exit 0 obnam: backup - reference: 42 + reference: 11 - obnam: restore - reference: 42 + reference: 12 - name: many_files description: backup many small files steps: - live: genbackupdata . --create=10 --file-size=1 obnam: backup - reference: 42 + reference: 31 - obnam: restore - reference: 42 + reference: 32 - obnam: backup reports_dir: /home/liw/obnam/benchmarks/test.dir/reports html_dir: /home/liw/obnam/benchmarks/test.dir/html |