aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-04-02 11:51:20 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-04-02 11:51:20 +0200
commit5f477e0561b613038888a0fd7169f9b6dc11b118 (patch)
tree0640f55742349a7820c023f0b35e9a72f96f05ce /src/benchmarks
parentb244e5c34f46556b5d978498b8b0749fdedbf319 (diff)
downloadallocbench-5f477e0561b613038888a0fd7169f9b6dc11b118.tar.gz
allocbench-5f477e0561b613038888a0fd7169f9b6dc11b118.zip
add analyze and server_benchmark feature
--analyze uses malt to trace the benchmarks behavior. It uses the run loop but the obtained results are not stored Benchmark.server_benchmark is used if only a server is started for each allocator and clients are used to measure its performance in the run loop. If server_benchmark is set to True the cmds are run with the system default allocator. Misc changes: * The global environment is no longer changed. Instead a custom env dict is passed to suprocesses containing LD_PRELOAD. * Failing cmds no longer skip the whole benchmark instead they now skip the malfunctioning allocator. * Fix default title in plot_single_arg an analyse run are not stored
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/mysql.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/benchmarks/mysql.py b/src/benchmarks/mysql.py
index e3f1f0f..0ac3f75 100644
--- a/src/benchmarks/mysql.py
+++ b/src/benchmarks/mysql.py
@@ -51,12 +51,12 @@ class Benchmark_MYSQL(Benchmark):
super().__init__()
- def start_and_wait_for_server(self, cmd_prefix=""):
+ def start_and_wait_for_server(self, cmd_prefix="", env=None):
actual_cmd = cmd_prefix.split() + server_cmd
print_info("Starting server with:", actual_cmd)
self.server = subprocess.Popen(actual_cmd, stdout=PIPE, stderr=PIPE,
- universal_newlines=True)
+ env=env, universal_newlines=True)
# TODO make sure server comes up !
sleep(10)
if self.server.poll() is not None:
@@ -135,8 +135,8 @@ class Benchmark_MYSQL(Benchmark):
print_status("Delete mysqld directory")
shutil.rmtree("mysql_test", ignore_errors=True)
- def preallocator_hook(self, allocator, run, verbose):
- if not self.start_and_wait_for_server(cmd_prefix=allocator[1]["cmd_prefix"]):
+ def preallocator_hook(self, allocator, run, env, verbose):
+ if not self.start_and_wait_for_server(cmd_prefix=allocator[1]["cmd_prefix"], env=env):
print_debug(allocator[1]["cmd_prefix"], file=sys.stderr)
raise Exception("Starting mysql server for {} failed with".format(allocator[0], self.server.returncode))