Skip to content

Commit f391c91

Browse files
Rename feature to shorter "iai" instead of "iai_callgrind_benchmarks"
Co-authored-by: samueltardieu <44656+samueltardieu@users.noreply.github.com>
1 parent e1e35dd commit f391c91

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/iai-callgrind.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
continue-on-error: true
5252
run: |
5353
echo "Running benchmarks on base branch: ${{ steps.base_branch.outputs.name }}"
54-
cargo bench --features iai_callgrind_benchmarks --bench iai_algos --bench iai_edmondskarp --bench iai_kuhn_munkres --bench iai_separate_components 2>&1 | tee baseline-output.txt
54+
cargo bench --features iai --bench iai_algos --bench iai_edmondskarp --bench iai_kuhn_munkres --bench iai_separate_components 2>&1 | tee baseline-output.txt
5555
5656
- name: Checkout PR branch
5757
run: git checkout ${{ github.sha }}
@@ -62,7 +62,7 @@ jobs:
6262
- name: Run benchmarks on PR branch
6363
run: |
6464
echo "Running benchmarks on PR branch"
65-
cargo bench --features iai_callgrind_benchmarks --bench iai_algos --bench iai_edmondskarp --bench iai_kuhn_munkres --bench iai_separate_components 2>&1 | tee pr-output.txt
65+
cargo bench --features iai --bench iai_algos --bench iai_edmondskarp --bench iai_kuhn_munkres --bench iai_separate_components 2>&1 | tee pr-output.txt
6666
6767
- name: Parse and compare results
6868
if: github.event_name == 'pull_request'

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pre-release-replacements = [
3434
]
3535

3636
[features]
37-
iai_callgrind_benchmarks = []
37+
iai = []
3838

3939
[dependencies]
4040
num-traits = "0.2.19"
@@ -98,19 +98,19 @@ harness = false
9898
[[bench]]
9999
name = "iai_algos"
100100
harness = false
101-
required-features = ["iai_callgrind_benchmarks"]
101+
required-features = ["iai"]
102102

103103
[[bench]]
104104
name = "iai_edmondskarp"
105105
harness = false
106-
required-features = ["iai_callgrind_benchmarks"]
106+
required-features = ["iai"]
107107

108108
[[bench]]
109109
name = "iai_kuhn_munkres"
110110
harness = false
111-
required-features = ["iai_callgrind_benchmarks"]
111+
required-features = ["iai"]
112112

113113
[[bench]]
114114
name = "iai_separate_components"
115115
harness = false
116-
required-features = ["iai_callgrind_benchmarks"]
116+
required-features = ["iai"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ cargo bench --bench algos --bench edmondskarp --bench kuhn_munkres --bench separ
7474

7575
### Deterministic Benchmarks (iai-callgrind)
7676

77-
For more precise and deterministic performance measurements, we use iai-callgrind which counts CPU instructions, cache hits/misses, and estimated cycles using Valgrind. These benchmarks are prefixed with `iai_` and require the `iai_callgrind_benchmarks` feature flag:
77+
For more precise and deterministic performance measurements, we use iai-callgrind which counts CPU instructions, cache hits/misses, and estimated cycles using Valgrind. These benchmarks are prefixed with `iai_` and require the `iai` feature flag:
7878

7979
```bash
8080
# Install valgrind first (required by iai-callgrind)
8181
sudo apt-get install valgrind # On Ubuntu/Debian
8282

8383
# Run the benchmarks with the feature flag
84-
cargo bench --features iai_callgrind_benchmarks --bench iai_algos --bench iai_edmondskarp --bench iai_kuhn_munkres --bench iai_separate_components
84+
cargo bench --features iai --bench iai_algos --bench iai_edmondskarp --bench iai_kuhn_munkres --bench iai_separate_components
8585
```
8686

8787
The iai-callgrind benchmarks provide consistent results across runs and are not affected by system load, making them ideal for detecting performance regressions. They run automatically in CI for all pull requests, comparing performance against the base branch.

0 commit comments

Comments
 (0)