Skip to content

Commit b0a57e7

Browse files
larseggertCopilot
andauthored
Update .github/workflows/codspeed.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lars Eggert <lars@eggert.org>
1 parent 743369f commit b0a57e7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
for bench in "$dir/benches"/*.rs; do
4747
bench=$(basename -s .rs "$bench")
4848
# Set measurement mode from Cargo.toml metadata, default to "instrumentation".
49+
# The following jq pipeline:
50+
# - Selects the package with name == $crate
51+
# - Looks up .metadata.bench[$bench].codspeed.mode for the benchmark
52+
# - If not set, defaults to "instrumentation"
4953
mode=$(cargo metadata --no-deps --format-version 1 | jq -r --arg crate "$crate" --arg bench "$bench" '.packages[] | select(.name == $crate) | .metadata.bench[$bench].codspeed.mode // "instrumentation"')
5054
if [ "$first" = true ]; then
5155
first=false

0 commit comments

Comments
 (0)