Skip to content

Commit

Permalink
fix: only include percentage when > 1ms
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Silberman committed Jul 26, 2019
1 parent b0c5f3c commit 6e7de1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/@best/github-integration/src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ export function generatePercentages(stats: ResultComparison, rows: number[] = []

const percentage = Math.abs((baseMed - targetMed) / baseMed * 100);
const relativeTrend = targetMed - baseMed;

allRows.push(Math.sign(relativeTrend) * percentage);

// only include percentage change when values are above 1ms.
if (baseMed > 1 && targetMed > 1) {
allRows.push(Math.sign(relativeTrend) * percentage);
}
}
})
}
Expand Down

0 comments on commit 6e7de1d

Please sign in to comment.