mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-06 19:20:32 -04:00
Truncate benchmark selfTime and totalTime values
This commit is contained in:
parent
479f1ba163
commit
775d38d8d5
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue