diff options
| -rw-r--r-- | allocbench/allocator.py | 2 | ||||
| -rw-r--r-- | allocbench/analyse.py | 3 | ||||
| -rw-r--r-- | allocbench/benchmark.py | 10 | ||||
| -rwxr-xr-x | bench.py | 6 |
4 files changed, 10 insertions, 11 deletions
diff --git a/allocbench/allocator.py b/allocbench/allocator.py index cbeee06..52f1321 100644 --- a/allocbench/allocator.py +++ b/allocbench/allocator.py @@ -239,7 +239,7 @@ def read_allocators_collection_file(alloc_path): exec_globals = {"__file__": alloc_path} with open(alloc_path, "r") as alloc_file: - exec(compile(alloc_file.read(), alloc_path, 'exec'), exec_globals) + exec(compile(alloc_file.read(), alloc_path, 'exec'), exec_globals) #pylint: disable=exec-used if "allocators" in exec_globals: return {a.name: a.build() for a in exec_globals["allocators"]} diff --git a/allocbench/analyse.py b/allocbench/analyse.py index 6a1841d..aff8893 100644 --- a/allocbench/analyse.py +++ b/allocbench/analyse.py @@ -57,8 +57,7 @@ def analyze_bench(bench): try: bench.run(runs=1) - # TODO: Introduce BenchmarkException - except Exception: + except Exception: #pylint: disable=broad-except print_debug(traceback.format_exc()) print_error("Skipping analysis of", bench, "!") diff --git a/allocbench/benchmark.py b/allocbench/benchmark.py index 16d4a98..1222a1e 100644 --- a/allocbench/benchmark.py +++ b/allocbench/benchmark.py @@ -534,7 +534,7 @@ class Benchmark: self.start_servers(alloc_name=alloc_name, alloc=alloc, env=os.environ) - except Exception as err: + except Exception as err: #pylint: disable=broad-except print_debug(traceback.format_exc()) print_error(err) print_error("Skipping", alloc_name) @@ -542,9 +542,9 @@ class Benchmark: # Preallocator hook if hasattr(self, "preallocator_hook"): - self.preallocator_hook( + self.preallocator_hook( # pylint: disable=no-member (alloc_name, alloc), - run, # pylint: disable=no-member + run, os.environ) # Run benchmark for alloc @@ -633,8 +633,8 @@ class Benchmark: Benchmark.parse_and_save_perf_output( result, res.stderr, alloc_name, perm) - if hasattr(self, "process_output"): # pylint: disable=no-member - self.process_output(result, res.stdout, res.stderr, + if hasattr(self, "process_output"): + self.process_output(result, res.stdout, res.stderr, # pylint: disable=no-member alloc_name, perm) # save a valid result so we can expand invalid ones @@ -176,7 +176,7 @@ def main(): try: print_status("Loading", bench, "...") bench = get_benchmark_object(bench) - except Exception: + except Exception: #pylint: disable=broad-except print_error(traceback.format_exc()) print_error(f"Skipping {bench}! Loading failed.") continue @@ -184,7 +184,7 @@ def main(): try: print_status("Preparing", bench, "...") bench.prepare() - except Exception: + except Exception: #pylint: disable=broad-except print_error(traceback.format_exc()) print_error(f"Skipping {bench}! Preparing failed.") continue @@ -201,7 +201,7 @@ def main(): bench.results['facts']['start-time'] = start_time.isoformat() try: bench.run(runs=args.runs) - except Exception: + except Exception: #pylint: disable=broad-except # Reset cwd os.chdir(cwd) print_error(traceback.format_exc()) |
