diff options
| -rw-r--r-- | TODO | 2 | ||||
| -rwxr-xr-x | bench.py | 4 | ||||
| -rw-r--r-- | src/globalvars.py | 6 | ||||
| -rw-r--r-- | src/util.py | 4 |
4 files changed, 14 insertions, 2 deletions
@@ -11,3 +11,5 @@ - verify (commit id, checksum) remote sources - git recursive clone +- implement verbosity aware system() wrapper + @@ -182,6 +182,8 @@ def main(): analyze_alloc = "chattymalloc" old_allocs = bench.allocators + old_measure_cmd = bench.measure_cmd + bench.measure_cmd = "" analyze_alloc_module = importlib.import_module(f"src.allocators.{analyze_alloc}") bench.allocators = {analyze_alloc: getattr(analyze_alloc_module, analyze_alloc).build()} @@ -191,6 +193,8 @@ def main(): print_error(traceback.format_exc()) print_error("Skipping analysis of", bench, "!") + bench.measure_cmd = old_measure_cmd + # Remove results for analyze_alloc if analyze_alloc in bench.results: del bench.results[analyze_alloc] diff --git a/src/globalvars.py b/src/globalvars.py index e18a589..98434c3 100644 --- a/src/globalvars.py +++ b/src/globalvars.py @@ -41,16 +41,22 @@ verbosity = 0 allocators = {} +# allocbench/src/ srcdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +# allocbench/src/benchmarks benchsrcdir = os.path.join(srcdir, "benchmarks") +# allocbench/src/allocators allocsrcdir = os.path.join(srcdir, "allocators") +# allocbench allocbenchdir = os.path.dirname(srcdir) +# allocbench/build builddir = os.path.join(allocbenchdir, "build") +# allocbench/build/allocators allocbuilddir = os.path.join(builddir, "allocators") resdir = None diff --git a/src/util.py b/src/util.py index dc66186..c5fa162 100644 --- a/src/util.py +++ b/src/util.py @@ -153,13 +153,13 @@ def print_version_and_exit(): proc = subprocess.run(["git", "status", "--porcelain"], universal_newlines=True, stdout=subprocess.PIPE) - + if proc.returncode != 0: print_error("git status --porcelain failed") exit(1) dirty = "-dirty" if proc.stdout != "" else "" - + print(f"{commit}{dirty}") exit(0) |
