Skip to content

Commit a16eb74

Browse files
committed
Revert "remove bench-utils feature"
This reverts commit 85b19a2.
1 parent e148c71 commit a16eb74

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

.github/workflows/base_benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ jobs:
6969
--thresholds-reset \
7070
--github-actions "$GITHUB_TOKEN" \
7171
--err \
72-
"cargo bench --bench ${{ matrix.suite }}"
72+
"cargo bench --bench ${{ matrix.suite }} --features bench-utils"

.github/workflows/pr_benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
--start-point-reset \
6565
--github-actions "$GITHUB_TOKEN" \
6666
--err \
67-
"cargo bench --bench ${{ matrix.suite }}"
67+
"cargo bench --bench ${{ matrix.suite }} --features bench-utils"

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"rust-analyzer.cargo.features": ["test-utils"],
2+
"rust-analyzer.cargo.features": ["test-utils", "bench-utils"],
33
"rust-analyzer.rustfmt.extraArgs": ["+nightly"]
44
}

CONTRIBUTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Uncomment the `[[bin]]` section:
209209
[[bin]]
210210
name = "generate_dump"
211211
path = "benches/generate_dump.rs"
212+
required-features = ["bench-utils"]
212213
```
213214

214215
### 2. Enable `node-bindings` for `alloy`
@@ -223,11 +224,13 @@ alloy = { version = "1.1.2", features = ["node-bindings"] }
223224
### 3. Run the generator
224225
225226
```bash
226-
cargo run --release --bin generate_dump -- \
227+
cargo run --release --bin generate_dump --features bench-utils -- \
227228
--events 100000 \
228229
--output benches/dumps/state_100000.json
229230
```
230231
232+
**Note**: The `--features bench-utils` flag is required to enable the dependencies needed by the generator.
233+
231234
This creates:
232235
- `benches/dumps/state_100000.json.gz` (compressed state dump)
233236
- `benches/dumps/state_100000.metadata.json` (metadata)

Cargo.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ publish = true
1919
exclude = [".github/", ".vscode/", ".config/", ".cargo/", "benches/", "tests/"]
2020

2121
[dependencies]
22-
alloy = "1.1.2"
23-
tokio = "1.48"
22+
alloy = { version = "1.1.2" }
23+
tokio = { version = "1.48" }
2424
futures = "0.3.31"
2525
anyhow = "1.0"
2626
thiserror = "2.0.17"
@@ -48,19 +48,28 @@ all = "warn"
4848
[[bench]]
4949
name = "historic_scanning"
5050
harness = false
51+
required-features = ["bench-utils"]
5152

5253
[[bench]]
5354
name = "latest_events_scanning"
5455
harness = false
56+
required-features = ["bench-utils"]
5557

5658
# uncomment only when new dumps need to be generated, see CONTRIBUTING.md
5759
# [[bin]]
5860
# name = "generate_dump"
5961
# path = "benches/generate_dump.rs"
62+
# required-features = ["bench-utils"]
6063

6164
[features]
6265
test-utils = ["alloy/node-bindings"]
6366
tracing = []
67+
bench-utils = [
68+
"dep:serde",
69+
"dep:serde_json",
70+
"dep:flate2",
71+
"alloy/node-bindings",
72+
]
6473

6574
[profile.release]
6675
lto = "thin"

0 commit comments

Comments
 (0)