Improve handling of missing data for bars

This commit is contained in:
2017-08-27 18:21:36 +02:00
parent f62e0dc31f
commit 9bda4f0470
2 changed files with 17 additions and 5 deletions

View File

@@ -202,10 +202,11 @@ class LatestResultVisitor(ResultVisitor):
data = []
for scene_name in all_scenes:
if scene_name not in stats:
# TODO(sergey): How to indicate missing dataset?
data.append(0)
data.append(None)
continue
scene_stats = stats[scene_name]
# data.append({"x": scene_name,
# "y": scene_stats['pipeline_render_time']})
data.append(scene_stats['pipeline_render_time'])
dataset = {
"label": device_name,

View File

@@ -84,9 +84,16 @@ function buildChart(ctx, bare_data) {
human_time = secondsToHumanReadable(render_time);
}
);
return "Render Time: " + human_time;
},
if (human_time != "") {
return "Render Time: " + human_time;
}
return "";
},
},
filter: function(item, data) {
var data = data.datasets[item.datasetIndex].data[item.index];
return !isNaN(data) && data !== null;
},
footerFontStyle: 'normal'},
}
});
@@ -103,7 +110,11 @@ function buildSpreadsheet(ctx, data) {
for (dataset of data.datasets) {
var row = [dataset.label];
for (value of dataset.data) {
row.push(secondsToHumanReadable(value));
if (value == null) {
row.push("");
} else {
row.push(secondsToHumanReadable(value));
}
}
rows.push(row);
}