aboutsummaryrefslogtreecommitdiff
path: root/src/benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmark.py')
-rw-r--r--src/benchmark.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index 469be0b..b436c15 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -524,7 +524,33 @@ class Benchmark (object):
line = ""
for i, x in enumerate(rows[alloc][perm]):
line += str(x).ljust(widths[i])
- print(line, file=f)
+ print(line.replace("_", "-"), file=f)
+
+ def export_to_dataref(self, datapoint, path=None):
+ allocators = self.results["allocators"]
+ args = self.results["args"]
+ stats = self.results["stats"]
+
+ if path is None:
+ path = datapoint
+
+ path = path + ".dataref"
+
+ # Example: \drefset{/mysql/glibc/40/Lower-whisker}{71552.0}
+ line = "\drefset{{/{}/{}/{}/{}}}{{{}}}"
+
+ with open(path, "w") as f:
+ for alloc in allocators:
+ for perm in self.iterate_args(args=args):
+ for statistic, values in stats[alloc][perm].items():
+ cur_line = line.format(self.name, alloc,
+ "/".join([str(p) for p in list(perm)]),
+ statistic, values[datapoint])
+ # Replace empty outliers
+ cur_line.replace("[]", "")
+ # Replace underscores
+ cur_line.replace("_", "-")
+ print(cur_line, file=f)
def write_best_doublearg_tex_table(self, evaluation, sort=">",
filepostfix="", sumdir="", std=False):