aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-07-13 18:24:51 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-07-13 18:24:51 +0200
commit86230f4b55da1d5962631743f7ddb11fe97a7ef2 (patch)
tree20b2aa0a036dcb309ac7e3ef808c3d697db2dc56
parent3e3efc095ec8df80189f16d151c4348680c1efcd (diff)
downloadallocbench-86230f4b55da1d5962631743f7ddb11fe97a7ef2.tar.gz
allocbench-86230f4b55da1d5962631743f7ddb11fe97a7ef2.zip
[mysql] escape tex special chars
-rw-r--r--allocbench/benchmarks/mysql.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/allocbench/benchmarks/mysql.py b/allocbench/benchmarks/mysql.py
index 3b51080..2587f17 100644
--- a/allocbench/benchmarks/mysql.py
+++ b/allocbench/benchmarks/mysql.py
@@ -303,11 +303,13 @@ class BenchmarkMYSQL(Benchmark):
file=table_file)
print("Fäden / Allokator ", end=" ", file=table_file)
for head in headers:
- print("& {}".format(head), end=" ", file=table_file)
+ print("& {}".format(plt.tex_escape(str(head))),
+ end=" ",
+ file=table_file)
print("\\\\\n\\hline", file=table_file)
for allocator in allocators:
- print(allocator, end=" ", file=table_file)
+ print(plt.tex_escape(allocator), end=" ", file=table_file)
for perm in self.iterate_args(args=args):
mean = data[allocator][perm]["mean"]
entry_string = "& \\textcolor{{{}}}{{{:.3f}}}"