Tests: show more precise numbers in benchmark charts
This commit is contained in:
parent
c0d0e2788b
commit
8ae6995e98
|
@ -98,8 +98,15 @@ class TestGraph:
|
||||||
for entry in entries:
|
for entry in entries:
|
||||||
test_index = tests[entry.test]
|
test_index = tests[entry.test]
|
||||||
revision_index = revisions[entry.revision]
|
revision_index = revisions[entry.revision]
|
||||||
time = entry.output[output] if output in entry.output else -1.0
|
output_value = entry.output[output] if output in entry.output else -1.0
|
||||||
rows[revision_index]['c'][test_index + 1] = {'f': None, 'v': time}
|
|
||||||
|
if output.find("memory") != -1:
|
||||||
|
formatted_value = '%.2f MB' % (output_value / (1024 * 1024))
|
||||||
|
else:
|
||||||
|
formatted_value = "%.4f" % output_value
|
||||||
|
|
||||||
|
cell = {'f': formatted_value, 'v': output_value}
|
||||||
|
rows[revision_index]['c'][test_index + 1] = cell
|
||||||
|
|
||||||
data = {'cols': cols, 'rows': rows}
|
data = {'cols': cols, 'rows': rows}
|
||||||
return {'device': device_name, 'name': chart_name, 'data': data, 'chart_type': chart_type}
|
return {'device': device_name, 'name': chart_name, 'data': data, 'chart_type': chart_type}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
ndt.addColumn('number', dt.getValue(x,0));
|
ndt.addColumn('number', dt.getValue(x,0));
|
||||||
for(var y=1; y<dt.getNumberOfColumns(); y++) {
|
for(var y=1; y<dt.getNumberOfColumns(); y++) {
|
||||||
ndt.setValue(y-1, x+1, dt.getValue(x,y));
|
ndt.setValue(y-1, x+1, dt.getValue(x,y));
|
||||||
|
ndt.setFormattedValue(y-1, x+1, dt.getFormattedValue(x,y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ndt;
|
return ndt;
|
||||||
|
|
Loading…
Reference in New Issue