aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/httpd.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/httpd.py')
-rw-r--r--src/benchmarks/httpd.py43
1 files changed, 17 insertions, 26 deletions
diff --git a/src/benchmarks/httpd.py b/src/benchmarks/httpd.py
index 0e386cc..2ac7fbc 100644
--- a/src/benchmarks/httpd.py
+++ b/src/benchmarks/httpd.py
@@ -1,14 +1,6 @@
-import matplotlib.pyplot as plt
-import numpy as np
import re
-import shutil
-import subprocess
-from subprocess import PIPE
-import sys
-from time import sleep
from src.benchmark import Benchmark
-from src.util import *
class Benchmark_HTTPD(Benchmark):
@@ -28,8 +20,8 @@ class Benchmark_HTTPD(Benchmark):
super().__init__()
def process_output(self, result, stdout, stderr, allocator, perm, verbose):
- 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)
+ 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)
# with open("/proc/"+str(self.server.pid)+"/status", "r") as f:
# for l in f.readlines():
@@ -39,34 +31,33 @@ class Benchmark_HTTPD(Benchmark):
def summary(self):
allocators = self.results["allocators"]
- args = self.results["args"]
self.calc_desc_statistics()
# linear plot
self.plot_fixed_arg("{requests}",
- xlabel='"threads"',
- ylabel='"requests/s"',
- autoticks=False,
- filepostfix="requests",
- title='"ab -n 10000 -c " + str(perm.nthreads)')
+ xlabel='"threads"',
+ ylabel='"requests/s"',
+ autoticks=False,
+ filepostfix="requests",
+ title='"ab -n 10000 -c " + str(perm.nthreads)')
# linear plot
ref_alloc = list(allocators)[0]
self.plot_fixed_arg("{requests}",
- xlabel='"threads"',
- ylabel='"requests/s scaled at " + scale',
- title='"ab -n 10000 -c " + str(perm.nthreads) + " (normalized)"',
- filepostfix="requests.norm",
- autoticks=False,
- scale=ref_alloc)
+ xlabel='"threads"',
+ ylabel='"requests/s scaled at " + scale',
+ title='"ab -n 10000 -c " + str(perm.nthreads) + " (normalized)"',
+ filepostfix="requests.norm",
+ autoticks=False,
+ scale=ref_alloc)
# bar plot
# self.barplot_fixed_arg("{requests}",
- # xlabel='"threads"',
- # ylabel='"requests/s"',
- # filepostfix="b",
- # title='"ab -n 10000 -c threads"')
+ # xlabel='"threads"',
+ # ylabel='"requests/s"',
+ # filepostfix="b",
+ # title='"ab -n 10000 -c threads"')
httpd = Benchmark_HTTPD()