summaryrefslogtreecommitdiff
path: root/obbenchlib
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-06 11:41:25 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-06 11:41:25 +0200
commit1f07804f538a7f7b87f7090b486cc46092748a25 (patch)
tree68882807cea2aac91740c4765e36c8f89788c85b /obbenchlib
parent43ef20a672897496df2ef1cedadeef21a4c8127a (diff)
downloadobnam-benchmarks-1f07804f538a7f7b87f7090b486cc46092748a25.tar.gz
Use the same timestamp for all benchmarks in a runliw/yunosame
Diffstat (limited to 'obbenchlib')
-rw-r--r--obbenchlib/benchmarker.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/obbenchlib/benchmarker.py b/obbenchlib/benchmarker.py
index f9c2b66..e7399a9 100644
--- a/obbenchlib/benchmarker.py
+++ b/obbenchlib/benchmarker.py
@@ -52,6 +52,11 @@ class Benchmarker(object):
if not os.path.exists(self.resultdir):
os.mkdir(self.resultdir)
+ # We want to use the same timestamp for all benchmarks. This
+ # is necessary so that all the benchmarks from one run for the
+ # same commit are easy to align.
+ self._timestamp = time.strftime('%Y-%m-%d %H:%M:%S')
+
for benchmark in self.spec['benchmarks']:
tempdir = self.create_temp_dir()
self._livedir = self.create_subdir(tempdir, 'live')
@@ -59,7 +64,6 @@ class Benchmarker(object):
self._srcdir = self.create_subdir(tempdir, 'src')
self._restored = self.create_subdir(tempdir, 'restored')
self._config = self.prepare_obnam_config(tempdir)
- self._timestamp = time.strftime('%Y-%m-%d %H:%M:%S')
self.prepare_obnam(ref)
result = self.run_benchmark(benchmark)