Adjust the multiplier to convert geomean so that scores are less than 50 in even the fastest browser/device. (#189)

This commit is contained in:
Ryosuke Niwa 2023-05-25 16:27:15 -07:00 committed by GitHub
parent 170710fdad
commit 1bc9ece1f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -122,7 +122,7 @@ class PageElement {
}
function geomeanToScore(geomean) {
const correctionFactor = 3; // This factor makes the test score look reasonably fit within 0 to 140.
const correctionFactor = 50; // This factor makes the test score look reasonably fit within 0 to 140.
return (60 * 1000) / geomean / correctionFactor;
}

View file

@ -213,7 +213,7 @@ describe("BenchmarkRunner", () => {
const total = syncTime + asyncTime;
const mean = total / suite.tests.length;
const geomean = Math.pow(total, 1 / suite.tests.length);
const score = (60 * 1000) / geomean / 3; // correctionFactor = 3
const score = (60 * 1000) / geomean / 50; // correctionFactor = 50
const { total: measuredTotal, mean: measuredMean, geomean: measuredGeomean, score: measuredScore } = runner._measuredValues;