From 3ab7c2c0cf803a1caeb5d2e45a663c84effe92fa Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 3 Jun 2020 11:16:01 +0200 Subject: [plots] fix export_stats_to_csv for missing datapoints --- allocbench/plots.py | 8 ++++++-- 1 file 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 -- cgit v1.2.3