From 1f07804f538a7f7b87f7090b486cc46092748a25 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 6 Feb 2016 11:41:25 +0200 Subject: Use the same timestamp for all benchmarks in a run --- obbenchlib/benchmarker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'obbenchlib') 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) -- cgit v1.2.1