From eb6c92b0d95eafb74018482e22398d9a3ca03afb Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 26 Jan 2024 01:47:36 +0530 Subject: [PATCH] Remove small differences --- scripts/runTime.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/runTime.ts b/scripts/runTime.ts index e968edcdb..1cce8e339 100644 --- a/scripts/runTime.ts +++ b/scripts/runTime.ts @@ -17,11 +17,6 @@ const getRuntimes = (csv: string): RunTimes => { const [testName, timeTaken] = line.split(','); if (testName && timeTaken) { runtimes[testName] = Number(timeTaken); - - // TODO: Add some variation to test logging. Should remove. - // if (Math.random() < 0.3) { - // runtimes[testName] *= Math.random() * 2; - // } } } return runtimes; @@ -72,14 +67,15 @@ const main = async () => { continue; } const delta = timeTaken - oldTimeTaken; + const { change, crossedThreshold } = percentageDifference(oldTimeTaken, timeTaken); const out = [ fileName, - testName, + testName.replace('#', ''), `${oldTimeTaken}/${timeTaken}`, `${delta.toString()}ms ${change}`, ]; - if (crossedThreshold) { + if (crossedThreshold && Math.abs(delta) > 25) { changed.push(out); } fullData.push(out);