aboutsummaryrefslogtreecommitdiff
path: root/larson.py
diff options
context:
space:
mode:
Diffstat (limited to 'larson.py')
-rw-r--r--larson.py38
1 files changed, 6 insertions, 32 deletions
diff --git a/larson.py b/larson.py
index d7d1033..728401b 100644
--- a/larson.py
+++ b/larson.py
@@ -1,7 +1,4 @@
-import matplotlib.pyplot as plt
import multiprocessing
-import numpy as np
-import os
import re
from benchmark import Benchmark
@@ -32,35 +29,12 @@ class Benchmark_Larson( Benchmark ):
if res:
result["throughput"] = int(res.group("throughput"))
return
- print(stdout)
- print("no match")
-
- def summary(self, sd=None):
- # Speedup thrash
- args = self.results["args"]
- nthreads = args["threads"]
- targets = self.results["targets"]
-
- sd = sd or ""
-
- for arg in args:
- loose_arg = [a for a in args if a != arg][0]
- for arg_value in args[arg]:
- for target in targets:
- y_vals = []
- for perm in self.iterate_args_fixed({arg : arg_value}, args=args):
- d = [m["throughput"] for m in self.results[target][perm]]
- y_vals.append(np.mean(d))
- x_vals = list(range(1, len(y_vals) + 1))
- plt.plot(x_vals, y_vals, marker='.', linestyle='-',
- label=target, color=targets[target]["color"])
- plt.legend()
- plt.xticks(x_vals, args[loose_arg])
- plt.xlabel(loose_arg)
- plt.ylabel("OPS/s")
- plt.title("Larson: " + arg + " " + str(arg_value))
- plt.savefig(os.path.join(sd, ".".join([self.name, arg, str(arg_value), "png"])))
- plt.clf()
+ def summary(self, sumdir):
+ # Plot threads->throughput and maxsize->throughput
+ self.plot_fixed_args("{throughput}",
+ ylabel="'OPS/s'",
+ title = "'Larson: ' + arg + ' ' + str(arg_value)",
+ sumdir=sumdir)
larson = Benchmark_Larson()