Skip to content

Commit cd87735

Browse files
Remove unnecessary target parameter from bench commands
- Remove target parameter from bench and bench-ci commands since they only accept release builds - Update GitHub workflows to remove target parameter usage - Simplify command signatures based on @syntactically's feedback Co-authored-by: syntactically <[email protected]>
1 parent 668f0da commit cd87735

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

.github/workflows/Benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858

5959
- name: Run Benchmarks
60-
run: just bench-ci main release ${{ matrix.hypervisor == 'mshv' && 'mshv2' || ''}}
60+
run: just bench-ci main ${{ matrix.hypervisor == 'mshv' && 'mshv2' || ''}}
6161

6262
- uses: actions/upload-artifact@v4
6363
with:

.github/workflows/dep_rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,5 @@ jobs:
186186

187187
- name: Run benchmarks
188188
run: |
189-
just bench-ci main ${{ matrix.config }} ${{ matrix.hypervisor == 'mshv' && 'mshv2' || ''}}
189+
just bench-ci main ${{ matrix.hypervisor == 'mshv' && 'mshv2' || ''}}
190190
if: ${{ matrix.config == 'release' }}

Justfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,12 @@ bench-download os hypervisor cpu tag="":
271271
tar -zxvf target/benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz -C target/criterion/ --strip-components=1
272272

273273
# Warning: compares to and then OVERWRITES the given baseline
274-
bench-ci baseline target="release" features="":
275-
@# Benchmarks should only be run with release builds for meaningful results
276-
@if [ "{{ target }}" != "release" ]; then echo "Error: Benchmarks can only be run with release builds. Use 'just bench-ci <baseline> release' instead."; exit 1; fi
274+
bench-ci baseline features="":
275+
@# Benchmarks are always run with release builds for meaningful results
277276
cargo bench --profile=release {{ if features =="" {''} else { "--features " + features } }} -- --verbose --save-baseline {{ baseline }}
278277

279-
bench target="release" features="":
280-
@# Benchmarks should only be run with release builds for meaningful results
281-
@if [ "{{ target }}" != "release" ]; then echo "Error: Benchmarks can only be run with release builds. Use 'just bench release' instead."; exit 1; fi
278+
bench features="":
279+
@# Benchmarks are always run with release builds for meaningful results
282280
cargo bench --profile=release {{ if features =="" {''} else { "--features " + features } }} -- --verbose
283281

284282
###############

0 commit comments

Comments
 (0)