aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/httpd.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-09-11 17:59:23 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-09-11 17:59:23 +0200
commit84374b4b4e41c4bb7896092c10098b5e6b5f68c1 (patch)
treee406322fb73570d5e1fbf5104326a8a8be2d2b0f /src/benchmarks/httpd.py
parentc36a2b00e6a487f988a7286ccb9c8968a937f30c (diff)
downloadallocbench-84374b4b4e41c4bb7896092c10098b5e6b5f68c1.tar.gz
allocbench-84374b4b4e41c4bb7896092c10098b5e6b5f68c1.zip
explicitly collect binary versions
There is no generic way to retrieve the version of a binary. Not everyone followes GNU cli guidelines and supports "--version". The larson benchmark for example reads input from stdin when started with "larson --version" blocking the Benchmark.prepare() call.
Diffstat (limited to 'src/benchmarks/httpd.py')
-rw-r--r--src/benchmarks/httpd.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/benchmarks/httpd.py b/src/benchmarks/httpd.py
index 4569500..7284e2e 100644
--- a/src/benchmarks/httpd.py
+++ b/src/benchmarks/httpd.py
@@ -20,6 +20,7 @@
import re
from src.benchmark import Benchmark
+import src.facter
class BenchmarkHTTPD(Benchmark):
@@ -42,6 +43,12 @@ class BenchmarkHTTPD(Benchmark):
super().__init__(name)
+ def prepare(self):
+ super().prepare()
+
+ self.results["facts"]["versions"]["nginx"] = src.facter.exe_version("nginx", "-v")
+ self.results["facts"]["versions"]["ab"] = src.facter.exe_version("ab", "-V")
+
@staticmethod
def process_output(result, stdout, stderr, allocator, perm):
result["time"] = re.search("Time taken for tests:\\s*(\\d*\\.\\d*) seconds", stdout).group(1)