aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-08-26 20:13:41 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-08-26 20:13:41 +0200
commit18f850dd06b771aa625f3f2f8a4a0a9efc433cd2 (patch)
treec5bb3fc820560d029c5e5ca2e1d5262d9d6d0bdf
parentd5080c21825d8b91938b1fc6c91431013d711dc0 (diff)
downloadallocbench-18f850dd06b771aa625f3f2f8a4a0a9efc433cd2.tar.gz
allocbench-18f850dd06b771aa625f3f2f8a4a0a9efc433cd2.zip
set Benchmark.result_dir in Benchmark.__init__
-rw-r--r--src/benchmark.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index 46177a7..28eaadd 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -85,6 +85,11 @@ class Benchmark (object):
if not hasattr(self, k):
setattr(self, k, Benchmark.defaults[k])
+ # Set result_dir
+ if not hasattr(self, "result_dir"):
+ self.result_dir = os.path.abspath(os.path.join(src.globalvars.resdir,
+ self.name))
+
# non copy types
if not hasattr(self, "args"):
self.args = {}
@@ -114,6 +119,7 @@ class Benchmark (object):
print_debug("Args:", self.args)
print_debug("Requirements:", self.requirements)
print_debug("Results dictionary:", self.results)
+ print_debug("Results directory:", self.result_dir)
def save(self, path=None):
f = path if path else self.name + ".save"