Skip to content

Commit 25797e0

Browse files
authored
fix: add summary even when failure threshold is surpassed (#285)
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
1 parent e3c6616 commit 25797e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/write.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ export async function writeBenchmark(bench: Benchmark, config: Config) {
541541
core.debug('Alert check was skipped because previous benchmark result was not found');
542542
} else {
543543
await handleComment(name, bench, prevBench, config);
544-
await handleAlert(name, bench, prevBench, config);
545544
await handleSummary(name, bench, prevBench, config);
545+
await handleAlert(name, bench, prevBench, config);
546546
}
547547
}
548548

0 commit comments

Comments
 (0)