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 /obbench | |
parent | 282901720ab62ea66105aa1e8759cd6ae6191d1e (diff) | |
download | obnam-benchmarks-10d8dad6941b1aaa952b86a4a88cc6c67057ee14.tar.gz |
More fixes for getting reference times from spec
Diffstat (limited to 'obbench')
-rwxr-xr-x | obbench | 9 |
1 files changed, 6 insertions, 3 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 |