diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/benchmark.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/benchmark.py b/src/benchmark.py index 9e32160..4658e01 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -11,11 +11,9 @@ import subprocess from src.allocators import allocators -perf_allowed = None - - class Benchmark (object): + perf_allowed = None defaults = { "name": "default_benchmark", @@ -139,7 +137,7 @@ class Benchmark (object): # check if perf is allowed on this system if self.measure_cmd == self.defaults["measure_cmd"]: - if perf_allowed == None: + if self.perf_allowed == None: res = subprocess.run(["perf", "stat", "ls"], stdout=None, stderr=subprocess.PIPE, universal_newlines=True) @@ -148,7 +146,7 @@ class Benchmark (object): print(res.stderr) perf_allowed = False - if not perf_allowed: + if not self.perf_allowed: print("Skipping", self.name, "because you don't have the", "needed permissions to use perf") return False |
