aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/httpd.py7
-rw-r--r--src/benchmarks/lld.py4
-rw-r--r--src/benchmarks/mysql.py5
-rw-r--r--src/benchmarks/redis.py2
4 files changed, 18 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)
diff --git a/src/benchmarks/lld.py b/src/benchmarks/lld.py
index bcedced..97ef545 100644
--- a/src/benchmarks/lld.py
+++ b/src/benchmarks/lld.py
@@ -25,6 +25,7 @@ import sys
import matplotlib.pyplot as plt
from src.benchmark import Benchmark
+import src.facter
from src.util import download_reporthook
@@ -51,6 +52,9 @@ class BenchmarkLld(Benchmark):
def prepare(self):
super().prepare()
+ # save lld version
+ self.results["facts"]["versions"]["lld"] = src.facter.exe_version("ld.lld", "-v")
+
test_dir = "lld-speed-test"
test_archive = f"{test_dir}.tar.xz"
if not os.path.isdir(test_dir):
diff --git a/src/benchmarks/mysql.py b/src/benchmarks/mysql.py
index a47873b..e71038f 100644
--- a/src/benchmarks/mysql.py
+++ b/src/benchmarks/mysql.py
@@ -28,6 +28,7 @@ import sys
import numpy as np
from src.benchmark import Benchmark
+import src.facter
from src.util import print_status, print_debug, print_info2
TESTDIR = os.path.join(os.getcwd(), "mysql_test")
@@ -72,6 +73,10 @@ class BenchmarkMYSQL(Benchmark):
def prepare(self):
super().prepare()
+ # save mysqld and sysbench versions
+ for exe in self.requirements:
+ self.results["facts"]["versions"][exe] = src.facter.exe_version(exe, "--version")
+
# Setup Test Environment
if not os.path.exists("mysql_test"):
print_status("Prepare mysqld directory and database")
diff --git a/src/benchmarks/redis.py b/src/benchmarks/redis.py
index 689a9b6..0afddba 100644
--- a/src/benchmarks/redis.py
+++ b/src/benchmarks/redis.py
@@ -55,6 +55,8 @@ class BenchmarkRedis(Benchmark):
redis_url = f"http://download.redis.io/releases/{redis_archive}"
redis_dir = os.path.join(self.build_dir, f"redis-{redis_version}")
+ self.results["facts"]["versions"]["redis"] = redis_version
+
if not os.path.isdir(redis_dir):
if not os.path.isfile(redis_archive):
print(f"Downloading redis-{redis_version}...")