From 775d38d8d5b59f3a35835db22643e4dae6cd603e Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Tue, 16 Jan 2018 18:32:19 -0500 Subject: [PATCH] Truncate benchmark selfTime and totalTime values --- src/playground/benchmark.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/playground/benchmark.js b/src/playground/benchmark.js index 3c296397..4e6d383b 100644 --- a/src/playground/benchmark.js +++ b/src/playground/benchmark.js @@ -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);