未验证 提交 14f1a7b2 编写于 作者: J Jan Potoms 提交者: GitHub

Positive req/seq change is not a warning (#14640)

Tweak PR stats message for req/sec metrics. I think they should warn when they are negative, not when positive
上级 a04fdc84
......@@ -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)
}`
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册