Skip to content

Commit

Permalink
Add summary even when failure threshold is surpassed
Browse files Browse the repository at this point in the history
Alerts are currently generated by throwing an exception. This means that
all code that comes after that exception is skipped, including generating
the Action summary.

We can easily fix this, by generating the summary first.

Longer term, we might want to reconsider the code style here.
An exception should model something exceptional happening in our code.
Seeing bad benchmark numbers is not exceptional. It's what this tool is
supposed to handle.

Closes #254
  • Loading branch information
414owen committed Dec 22, 2024
1 parent e3c6616 commit 124f780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ export async function writeBenchmark(bench: Benchmark, config: Config) {
core.debug('Alert check was skipped because previous benchmark result was not found');
} else {
await handleComment(name, bench, prevBench, config);
await handleAlert(name, bench, prevBench, config);
await handleSummary(name, bench, prevBench, config);
await handleAlert(name, bench, prevBench, config);
}
}

Expand Down

0 comments on commit 124f780

Please sign in to comment.