Skip to content

Commit f647ec3

Browse files
Copilotsyntactically
authored andcommitted
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]> Signed-off-by: Simon Davies <[email protected]>
1 parent c29b4cd commit f647ec3

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
@@ -324,14 +324,12 @@ bench-download os hypervisor cpu tag="":
324324
tar -zxvf target/benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz -C target/criterion/ --strip-components=1
325325

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

332-
bench target="release" features="":
333-
@# Benchmarks should only be run with release builds for meaningful results
334-
@if [ "{{ target }}" != "release" ]; then echo "Error: Benchmarks can only be run with release builds. Use 'just bench release' instead."; exit 1; fi
331+
bench features="":
332+
@# Benchmarks are always run with release builds for meaningful results
335333
cargo bench --profile=release {{ if features =="" {''} else { "--features " + features } }} -- --verbose
336334

337335
###############

0 commit comments

Comments
 (0)