Implement resolc end-to-end compilation benchmarks (#406)

# Description

Closes [#403](https://github.com/paritytech/revive/issues/403)

Adds compilation time benchmarks for resolc end-to-end.

The benchmarks can be run from the root via:

```sh
make bench-resolc
```

HTML reports will be generated under `target/criterion`, and a summary
of the results at
[crates/resolc/BENCHMARKS_M4PRO.md](https://github.com/paritytech/revive/blob/lj/compilation-benchmarks/crates/resolc/BENCHMARKS_M4PRO.md)
(currently from running on a Mac M4 Pro).
This commit is contained in:
LJ
2025-11-19 12:16:07 +01:00
committed by GitHub
parent e78f3cc419
commit ad61b6e3c9
24 changed files with 668 additions and 193 deletions
+6 -1
View File
@@ -20,6 +20,7 @@
bench \
bench-pvm \
bench-evm \
bench-resolc \
clean
install: install-bin install-npm
@@ -66,7 +67,7 @@ test-integration: install-bin
cargo test --package revive-integration
test-resolc: install
cargo test --package resolc
cargo test --package resolc --benches
test-workspace: install
cargo test --workspace --exclude revive-llvm-builder
@@ -90,6 +91,10 @@ bench-evm: install-bin
cargo criterion --bench execute --features bench-evm --message-format=json \
| criterion-table > crates/benchmarks/EVM.md
bench-resolc: test-resolc
cargo criterion --package resolc --bench compile --message-format=json \
| criterion-table > crates/resolc/BENCHMARKS_M4PRO.md
clean:
cargo clean ; \
revive-llvm clean ; \