Skip to content

Commit

Permalink
feat: rss-memory metric (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind authored Nov 20, 2024
1 parent 238e4f9 commit b6a59d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ function getOverThresholdTags(diff) {
if (typeof data.baseMean !== 'number') {
return null;
}
if (data.currentMean / data.baseMean < 1.05) {
if (tag.endsWith("memory")) {
if (data.currentMean / data.baseMean < 1.3) {
// The memory usage is unstable (with fluctuations of approximately 20%) during Hot Module Replacement (HMR), so it won't be counted for now.
return null;
}
} else if (data.currentMean / data.baseMean < 1.05) {
return null;
}
return tag;
Expand Down Expand Up @@ -76,7 +81,7 @@ async function getResults(date, index, benchmarkDirectory) {
}

export async function compare(base, current, benchmarkDirectory) {
const compareMetric = ["exec"];
const compareMetric = ["exec", "rss memory"];

const index = await fetchIndex();
if (base === "latest") {
Expand Down

0 comments on commit b6a59d3

Please sign in to comment.