Truncate benchmark selfTime and totalTime values

This commit is contained in:
Michael "Z" Goddard 2018-01-16 18:32:19 -05:00
parent 479f1ba163
commit 775d38d8d5
No known key found for this signature in database
GPG key ID: 762CD40DD5349872

View file

@ -134,10 +134,16 @@ class StatView {
}
cell = document.createElement('td');
// Truncate selfTime. Value past the microsecond are floating point
// noise.
this.selfTime = Math.floor(this.selfTime * 1000) / 1000;
cell.innerText = (this.selfTime / 1000).toPrecision(3);
row.appendChild(cell);
cell = document.createElement('td');
// Truncate totalTime. Value past the microsecond are floating point
// noise.
this.totalTime = Math.floor(this.totalTime * 1000) / 1000;
cell.innerText = (this.totalTime / 1000).toPrecision(3);
row.appendChild(cell);