aboutsummaryrefslogtreecommitdiff
path: root/bench_conprod.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-07-23 11:27:20 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-07-23 11:28:31 +0200
commit1fe2e5d4cccd6f1858a06ecc0eb940426ce9b7ea (patch)
tree35b0736f17b23d5c41becb2ce0e34f3a12a285cd /bench_conprod.py
parente29de27e578432762ba4afd225d0331a8c66b7f7 (diff)
downloadallocbench-1fe2e5d4cccd6f1858a06ecc0eb940426ce9b7ea.tar.gz
allocbench-1fe2e5d4cccd6f1858a06ecc0eb940426ce9b7ea.zip
whitespace cleanup
Diffstat (limited to 'bench_conprod.py')
-rw-r--r--bench_conprod.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bench_conprod.py b/bench_conprod.py
index 31c4d2e..98a3a84 100644
--- a/bench_conprod.py
+++ b/bench_conprod.py
@@ -23,7 +23,7 @@ class Benchmark_ConProd( Benchmark ):
self.targets = common_targets
self.maxsize = [2 ** x for x in range(6, 16)]
self.nthreads = range(1, multiprocessing.cpu_count() + 1)
-
+
self.results = {"args" : {"nthreads" : self.nthreads, "maxsize" : self.maxsize},
"targets" : self.targets}
@@ -39,7 +39,7 @@ class Benchmark_ConProd( Benchmark ):
if verbose:
print(r, "found and executable.")
return True
-
+
def run(self, verbose=False, runs=3):
args_permutations = [(x,y) for x in self.nthreads for y in self.maxsize]
n = len(args_permutations)
@@ -48,7 +48,7 @@ class Benchmark_ConProd( Benchmark ):
for i, args in enumerate(args_permutations):
print(i + 1, "of", n, "\r", end='')
-
+
# run cmd for each target
for tname, t in self.targets.items():
result = {"VSZ" : [] , "RSS" : []}
@@ -151,5 +151,5 @@ class Benchmark_ConProd( Benchmark ):
plt.title("Consumer Producer: " + str(n) + "thread(s)")
plt.savefig(self.file_name + "." + str(n) + "thread.png")
plt.clf()
-
+
conprod = Benchmark_ConProd()