We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 743369f commit b0a57e7Copy full SHA for b0a57e7
1 file changed
.github/workflows/codspeed.yml
@@ -46,6 +46,10 @@ jobs:
46
for bench in "$dir/benches"/*.rs; do
47
bench=$(basename -s .rs "$bench")
48
# 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"
53
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"')
54
if [ "$first" = true ]; then
55
first=false
0 commit comments