Skip to content

Commit

Permalink
positive req/seq is not a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Jun 27, 2020
1 parent 479c38d commit 42d3443
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/next-stats-action/src/add-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ module.exports = async function addComment(
// check if there is still a change after rounding
if (change !== 0) {
const absChange = Math.abs(change)
change = `${change < 0 ? '-' : '⚠️ +'}${
const warnIfNegative = isBenchmark && itemKey.match(/req\/sec/)
const warn = warnIfNegative
? change < 0
? ''
: '⚠️ '
: change > 0
? '⚠️ '
: ''
change = `${warn}${change < 0 ? '-' : '+'}${
useRawValue ? absChange : prettify(absChange, prettyType)
}`
}
Expand Down

0 comments on commit 42d3443

Please sign in to comment.