diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-04 23:24:21 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-11 17:28:29 +0200 |
| commit | 062f2c8662f586e651655dbb5de7c0423fe028c9 (patch) | |
| tree | c792d0c773d46a29caf1aac7c6ba00d03dab1da4 /src/benchmarks | |
| parent | 4c1f4b58107d82e726cc3ae45db1b74cb4475db9 (diff) | |
| download | allocbench-062f2c8662f586e651655dbb5de7c0423fe028c9.tar.gz allocbench-062f2c8662f586e651655dbb5de7c0423fe028c9.zip | |
improve server benchmarks
servers are now dictionary with two mandatory keys: "name" and "cmd".
Optional keys are:
* "prepare_cmds": commands are run after a server is started
* "shutdown_cmds": commands are run before a server is terminated
Diffstat (limited to 'src/benchmarks')
| -rw-r--r-- | src/benchmarks/httpd.py | 7 | ||||
| -rw-r--r-- | src/benchmarks/mysql.py | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/benchmarks/httpd.py b/src/benchmarks/httpd.py index 16d3b20..4569500 100644 --- a/src/benchmarks/httpd.py +++ b/src/benchmarks/httpd.py @@ -32,8 +32,11 @@ class BenchmarkHTTPD(Benchmark): "site": ["index.html", "index.php"]} self.cmd = "ab -n 10000 -c {nthreads} localhost:8080/{site}" self.measure_cmd = "" - self.server_cmds = ["nginx -c {builddir}/benchmarks/httpd/etc/nginx/nginx.conf", - "php-fpm -c {builddir}/benchmarks/httpd/etc/php/php.ini -y {builddir}/benchmarks/httpd/etc/php/php-fpm.conf -F"] + self.servers = [{"name": "nginx", + "cmd": "nginx -c {builddir}/benchmarks/httpd/etc/nginx/nginx.conf"}, + {"name": "php-fpm", + "cmd": "php-fpm -c {builddir}/benchmarks/httpd/etc/php/php.ini "\ + "-y {builddir}/benchmarks/httpd/etc/php/php-fpm.conf -F"}] self.requirements = ["nginx", "ab"] diff --git a/src/benchmarks/mysql.py b/src/benchmarks/mysql.py index 28cb982..a47873b 100644 --- a/src/benchmarks/mysql.py +++ b/src/benchmarks/mysql.py @@ -56,7 +56,8 @@ class BenchmarkMYSQL(Benchmark): self.args = {"nthreads": Benchmark.scale_threads_for_cpus(1)} self.cmd = CMD - self.server_cmds = [SERVER_CMD] + self.servers = [{"name": "mysqld", + "cmd" : SERVER_CMD}] self.measure_cmd = "" self.requirements = ["mysqld", "sysbench"] |
