AgentStack
SKILL verified MIT Self-run

Cargo Bench Rt

skill-gertsylvest-meta-team-cargo-bench-rt · by gertsylvest

Run a Criterion benchmark on a Rust DSP crate and assert against a checked-in baseline. Establishes whether the implementation fits the real-time budget and catches performance regressions — the Rust equivalent of `perf stat` against the audio buffer time.

No reviews yet
0 installs
1 views
0.0% view→install

Install

$ agentstack add skill-gertsylvest-meta-team-cargo-bench-rt

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README — it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-gertsylvest-meta-team-cargo-bench-rt)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Cargo Bench Rt? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Cargo Bench RT

Audio DSP correctness is not enough — the implementation must also fit within the real-time buffer budget. At 48 kHz with a 128-sample block (the AudioWorklet quantum), a process() call has roughly 2.67 ms to complete; on a typical native build with 256-sample blocks at 48 kHz the budget is ~5.33 ms.

This skill wraps Criterion in two modes:

  1. First run / baseline mode — establishes a baseline measurement of a named bench and commits it.
  2. Regression mode — compares the current measurement against the committed baseline and fails if the regression exceeds a configurable percentage.

The intent mirrors the c-audio-engineer's "profile the callback against the real-time budget" rule, applied to Rust DSP crates.

Requirements

  • A [[bench]] entry in the crate's Cargo.toml for the named benchmark.
  • The criterion crate as a dev-dependency.
  • A bench source file at benches/.rs using the Criterion harness.

Typical Criterion bench skeleton:

use criterion::{black_box, criterion_group, criterion_main, Criterion};

fn bench_process(c: &mut Criterion) {
    let mut state = my_dsp::Processor::new(48_000.0);
    let mut buf = [0.0_f32; 128];
    c.bench_function("process_128", |b| {
        b.iter(|| state.process(black_box(&mut buf)));
    });
}

criterion_group!(benches, bench_process);
criterion_main!(benches);

Instructions

The arguments are in $ARGUMENTS. Pass them directly to the bench script:

bash "$(dirname "$0")/bench.sh" $ARGUMENTS
  • Argument 1: crate directory.
  • Argument 2: bench name (matches the [[bench]] name = "..." in Cargo.toml).
  • Optional --save-baseline: overwrite the baseline with the current measurement. Use after a deliberate performance change.
  • Optional --budget-pct N (default 5): regression budget in percent. The bench fails if the new measurement is more than N% slower than the baseline.

Output sections

| Section | What it reports | |---|---| | BENCH | Criterion run summary (mean, std dev, throughput) | | BUDGET | Pass/fail vs the baseline, with the actual delta |

Typical usage

# Establish a baseline after a deliberate optimisation
bash bench.sh ./rust/audio-dsp process_128 --save-baseline

# Regression check on every CI run (default budget: 5%)
bash bench.sh ./rust/audio-dsp process_128

# Tighter budget for hot-path benches
bash bench.sh ./rust/audio-dsp process_128 --budget-pct 2

What to look for

  • BENCH mean exceeding the real-time budget — the implementation cannot keep up with real time even on the development machine. Profile (Instruments / perf), find the hot function, optimise. Do not commit a baseline that is already over budget.
  • BUDGET failing — the change made the bench slower than tolerable. Inspect the diff for the cause: extra branching, unintentional bounds checks, a #[inline] removed, SIMD path disabled.
  • High standard deviation — the measurement is noisy. Run with the machine under low load, close browsers and heavy processes, or use taskset/nice to pin the bench to a quiet CPU.

Where the baseline lives

Criterion stores baselines under target/criterion///. This skill uses baseline name rt-baseline and expects projects to commit it under benches/baselines// — see the script for the exact mapping.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.