aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-08-27 17:11:21 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-08-27 17:11:21 +0200
commit7e298c025da08d0de096df3fcac7c8fafac9f5c2 (patch)
treed905bee6549430b25580d289cdd44776718c5b55
parent93e3aac6315c17a74e63f02053a3e8e2e6b21928 (diff)
downloadallocbench-7e298c025da08d0de096df3fcac7c8fafac9f5c2.tar.gz
allocbench-7e298c025da08d0de096df3fcac7c8fafac9f5c2.zip
remove verbosity argument from hooks
-rw-r--r--src/benchmark.py12
-rw-r--r--src/benchmarks/dj_trace.py3
-rw-r--r--src/benchmarks/falsesharing.py3
-rw-r--r--src/benchmarks/httpd.py3
-rw-r--r--src/benchmarks/larson.py3
-rw-r--r--src/benchmarks/mysql.py5
6 files changed, 14 insertions, 15 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index 28eaadd..9bf5b55 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -27,9 +27,6 @@ class Benchmark (object):
defaults = {
"name": "default_benchmark",
- "description": ("This is the default benchmark description please add"
- "your own useful one."),
-
"measure_cmd": "perf stat -x, -d",
"cmd": "true",
"server_cmds": [],
@@ -310,8 +307,7 @@ class Benchmark (object):
# Preallocator hook
if hasattr(self, "preallocator_hook"):
- self.preallocator_hook((alloc_name, alloc), run, env,
- verbose=src.globalvars.verbosity)
+ self.preallocator_hook((alloc_name, alloc), run, env)
# Run benchmark for alloc
for perm in self.iterate_args():
@@ -402,8 +398,7 @@ class Benchmark (object):
if hasattr(self, "process_output"):
self.process_output(result, res.stdout, res.stderr,
- alloc_name, perm,
- verbose=src.globalvars.verbosity)
+ alloc_name, perm)
# save a valid result so we can expand invalid ones
if valid_result is not None:
@@ -420,8 +415,7 @@ class Benchmark (object):
self.shutdown_servers()
if hasattr(self, "postallocator_hook"):
- self.postallocator_hook((alloc_name, alloc), run,
- verbose=src.globalvars.verbosity)
+ self.postallocator_hook((alloc_name, alloc), run)
print()
diff --git a/src/benchmarks/dj_trace.py b/src/benchmarks/dj_trace.py
index b837a9e..29b0f43 100644
--- a/src/benchmarks/dj_trace.py
+++ b/src/benchmarks/dj_trace.py
@@ -143,7 +143,8 @@ class BenchmarkDJTrace(Benchmark):
return False
- def process_output(self, result, stdout, stderr, allocator, perm, verbose):
+ @staticmethod
+ def process_output(result, stdout, stderr, allocator, perm):
def to_int(string):
return int(string.replace(',', ""))
diff --git a/src/benchmarks/falsesharing.py b/src/benchmarks/falsesharing.py
index 203aeb8..046a362 100644
--- a/src/benchmarks/falsesharing.py
+++ b/src/benchmarks/falsesharing.py
@@ -29,7 +29,8 @@ class BenchmarkFalsesharing(Benchmark):
self.requirements = ["cache-thrash", "cache-scratch"]
super().__init__()
- def process_output(self, result, stdout, stderr, allocator, perm, verbose):
+ @staticmethod
+ def process_output(result, stdout, stderr, allocator, perm):
result["time"] = TIME_RE.match(stdout).group("time")
def summary(self):
diff --git a/src/benchmarks/httpd.py b/src/benchmarks/httpd.py
index b63f675..d981233 100644
--- a/src/benchmarks/httpd.py
+++ b/src/benchmarks/httpd.py
@@ -22,7 +22,8 @@ class BenchmarkHTTPD(Benchmark):
super().__init__()
- def process_output(self, result, stdout, stderr, allocator, perm, verbose):
+ @staticmethod
+ def process_output(result, stdout, stderr, allocator, perm):
result["time"] = re.search("Time taken for tests:\\s*(\\d*\\.\\d*) seconds", stdout).group(1)
result["requests"] = re.search("Requests per second:\\s*(\\d*\\.\\d*) .*", stdout).group(1)
diff --git a/src/benchmarks/larson.py b/src/benchmarks/larson.py
index 642901b..234f7b1 100644
--- a/src/benchmarks/larson.py
+++ b/src/benchmarks/larson.py
@@ -28,7 +28,8 @@ class BenchmarkLarson(Benchmark):
self.requirements = ["larson"]
super().__init__()
- def process_output(self, result, stdout, stderr, target, perm, verbose):
+ @staticmethod
+ def process_output(result, stdout, stderr, target, perm):
for line in stdout.splitlines():
res = THROUGHPUT_RE.match(line)
if res:
diff --git a/src/benchmarks/mysql.py b/src/benchmarks/mysql.py
index 8beb7e6..544d72a 100644
--- a/src/benchmarks/mysql.py
+++ b/src/benchmarks/mysql.py
@@ -96,12 +96,13 @@ class BenchmarkMYSQL(Benchmark):
self.shutdown_servers()
- def cleanup(self):
+ @staticmethod
+ def cleanup():
if os.path.exists("mysql_test"):
print_status("Delete mysqld directory")
shutil.rmtree("mysql_test", ignore_errors=True)
- def process_output(self, result, stdout, stderr, allocator, perm, verbose):
+ def process_output(self, result, stdout, stderr, allocator, perm):
result["transactions"] = re.search("transactions:\\s*(\\d*)", stdout).group(1)
result["queries"] = re.search("queries:\\s*(\\d*)", stdout).group(1)
# Latency