blob: f1f76ab725db4a03c4af4e84601c1f3021dc1016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import inspect
import os
"""Dict holding facts about the current benchmark run"""
facts = {}
"""Verbosity level -1: quiet, 0: status, 1: info, 2: stdout of subcommands, 3: debug info"""
verbosity = 0
"""Dict holding the allocators to compare"""
allocators = {}
"""Directory of allocbench sources"""
srcdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
"""Source directory for all benchmarks"""
benchsrcdir = os.path.join(srcdir, "benchmarks")
"""Source directory for all benchmarks"""
allocsrcdir = os.path.join(srcdir, "allocators")
"""Root directory of allocbench"""
allocbenchdir = os.path.dirname(srcdir)
"""Path of the build directory"""
builddir = os.path.join(allocbenchdir, "build")
"""Path of the allocators build directory"""
allocbuilddir = os.path.join(builddir, "allocators")
"""Directory were the benchmark results are stored"""
resdir = None
"""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"]
|