UNPKG

bench-chain

Version:

benchmark recording - averages & graphs.

35 lines (29 loc) 1.08 kB
// @TODO needs fixing // const lt = end2 === -1 || end2 === 0 // const usep = (end2 === 1 || lt) && false // if (usep) { // end = percent + '%' // if (lt) word = 'slower' // // if (lt && !this.asyncMode) word = 'faster (ops/s)' // // else if (!this.asyncMode) word = 'slower (ops/s)' // } else /* prettier-ignore */ const percentage = diff / 100 const fixed = percentage * 1000 const end2 = Math.round(percentage * 10) / 10 const end3 = Math.round(value / other / 100 * 1000) const end4 = (value / 100) * other const end5 = percentRank(value, other) const end6 = percentRank(other, value) const diff2 = value / other const percentage2 = diff2 / 100 const fixed2 = percentage2 * 1000 const diff = other / value const percentage = diff / 100 const fixed = percentage * 1000 const end2 = Math.round(percentage * 10) / 10 const end3 = Math.round(value / other / 100 * 1000) const diff2 = value / other const percentage2 = diff2 / 100 const fixed2 = percentage2 * 1000 return fixed2.toFixed(2)