aboutsummaryrefslogtreecommitdiff
path: root/bench_conprod.py
diff options
context:
space:
mode:
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()