aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-06-03 11:16:01 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-06-03 11:16:01 +0200
commit3ab7c2c0cf803a1caeb5d2e45a663c84effe92fa (patch)
treea290822cd41fa608a139935fc1fef95b11b598da
parent5d4038b46a178a62a6ff408cabf365147279d71a (diff)
downloadallocbench-3ab7c2c0cf803a1caeb5d2e45a663c84effe92fa.tar.gz
allocbench-3ab7c2c0cf803a1caeb5d2e45a663c84effe92fa.zip
[plots] fix export_stats_to_csv for missing datapoints
-rw-r--r--allocbench/plots.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/allocbench/plots.py b/allocbench/plots.py
index bf47cbb..014196b 100644
--- a/allocbench/plots.py
+++ b/allocbench/plots.py
@@ -470,10 +470,14 @@ def export_stats_to_csv(bench, datapoint, path=None):
row.append(alloc)
row += list(perm._asdict().values())
row += [
- stats[alloc][perm][stat][datapoint]
+ stats[alloc][perm][stat].get(datapoint, nan)
for stat in stats[alloc][perm]
]
- row[-1] = (",".join([str(x) for x in row[-1]]))
+ if row[-1] is not nan:
+ row[-1] = (",".join([str(x) for x in row[-1]]))
+ else:
+ row[-1] = ""
+
rows[alloc][perm] = row
# calc widths