Skip to content

Commit

Permalink
Use the right icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pepicrft committed Jan 3, 2023
1 parent d39c5c1 commit 4957de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workspace/src/generate-benchmark-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ const baselineBenchmark = JSON.parse(await fs.readFile(baselineBenchmarkPath, 'u
const benchmark = JSON.parse(await fs.readFile(benchmarkPath, 'utf8'))

const rows = []
for (const command in benchmark) {
for (const command of Object.keys(benchmark).sort()) {
if (baselineBenchmark[command] === undefined) {
rows.push(['⚪️', `\`${command}\``, 'N/A', `${benchmark[command]} ms`, 'N/A'])
} else {
const diff = (benchmark[command] / baselineBenchmark[command] - 1) * 100
let icon = '⚪️'
if (diff < 0) {
if (diff <= 0) {
icon = '🟢'
} else if (diff < 2) {
icon = '🟡'
Expand Down

0 comments on commit 4957de4

Please sign in to comment.