From c00983486fb46c2514b0d783a44e762afc347067 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 10 Apr 2019 11:57:47 +0200 Subject: dj_trace: make tex table standalone --- src/benchmarks/dj_trace.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/benchmarks') diff --git a/src/benchmarks/dj_trace.py b/src/benchmarks/dj_trace.py index 062f34c..162750e 100644 --- a/src/benchmarks/dj_trace.py +++ b/src/benchmarks/dj_trace.py @@ -255,12 +255,15 @@ class Benchmark_DJ_Trace(Benchmark): fname = ".".join([self.name, perm.workload, "table.tex"]) with open(fname, "w") as f: + print("\\documentclass{standalone}", file=f) + print("\\usepackage{xcolor}", file=f) + print("\\begin{document}", file=f) print("\\begin{tabular}{| l | l | l |}", file=f) print("& Zeit (ms) / $\\sigma$ (\\%) & VmHWM (KB) / $\\sigma$ (\\%) \\\\", file=f) print("\\hline", file=f) for allocator in allocators: - print(allocator, end=" & ", file=f) + print(allocator.replace("_", "\\_"), end=" & ", file=f) s = "\\textcolor{{{}}}{{{}}} / {}" @@ -285,6 +288,7 @@ class Benchmark_DJ_Trace(Benchmark): print(s.format(color, m, np.std(t)/m if m else 0), "\\\\", file=f) print("\end{tabular}", file=f) + print("\\end{document}", file=f) # Create summary similar to DJ's at # https://sourceware.org/ml/libc-alpha/2017-01/msg00452.html -- cgit v1.2.3