aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-04-29 17:12:41 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-04-29 17:12:41 +0200
commitcdfd77af6e6ca5f4352d42573a33d51c09eba5b3 (patch)
tree020144ec4498eef017db813be3dc6e39b6830c8c /src
parent01a013838d217f49efd772f4a5b54e35710e9236 (diff)
downloadallocbench-cdfd77af6e6ca5f4352d42573a33d51c09eba5b3.tar.gz
allocbench-cdfd77af6e6ca5f4352d42573a33d51c09eba5b3.zip
move list of available benchmarks to src.globalvars.benchmarks
fix analyse
Diffstat (limited to 'src')
-rw-r--r--src/benchmark.py1
-rw-r--r--src/globalvars.py14
2 files changed, 13 insertions, 2 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index f904c7a..4b1ae7f 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -172,7 +172,6 @@ class Benchmark (object):
if runs < 1:
return
- print_status("Running", self.name, "...")
# check if perf is allowed on this system
if self.measure_cmd == self.defaults["measure_cmd"]:
if Benchmark.perf_allowed == None:
diff --git a/src/globalvars.py b/src/globalvars.py
index c897786..7bf3de7 100644
--- a/src/globalvars.py
+++ b/src/globalvars.py
@@ -1,3 +1,4 @@
+import inspect
import os
@@ -13,8 +14,19 @@ allocators = {}
"""File were the allocators definitions are loaded from"""
allocators_file = None
+"""Root directory of allocbench"""
+allocbenchdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
+allocbenchdir = os.path.dirname(allocbenchdir)
+
"""Path of the build directory"""
-builddir = os.path.join(os.getcwd(), "build")
+builddir = "build"
"""Directory were the benchmark results are stored"""
resdir = None
+
+"""Source directory for all benchmarks"""
+benchsrcdir = "src/benchmarks"
+
+"""List of available benchmarks"""
+benchmarks = [e[:-3] for e in os.listdir(os.path.join(allocbenchdir, benchsrcdir))
+ if e[-3:] == ".py" and e != "__init__.py"]