BE
bench
Run Criterion benchmarks for the workspace or a specific group. Use when the user asks to benchmark, measure performance, or compare algorithm speeds.
Install
mkdir -p .claude/skills/bench && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14756" && unzip -o skill.zip -d .claude/skills/bench && rm skill.zipInstalls to .claude/skills/bench
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run Criterion benchmarks for the workspace or a specific group. Use when the user asks to benchmark, measure performance, or compare algorithm speeds.150 chars✓ has a “when” trigger
About this skill
Run Criterion benchmarks for openHiTLS-rs.
Usage
/bench— run all benchmarks/bench sha2— run benchmarks matching "sha2"/bench aes -- --sample-size 200— custom Criterion flags
Behavior
-
If
$ARGUMENTSis empty, run:cargo bench --package hitls-crypto --all-features -
If
$ARGUMENTSspecifies a filter, run:cargo bench --package hitls-crypto --all-features -- "$ARGUMENTS" -
After benchmarks complete, report:
- Median times for each benchmark
- Throughput (MB/s) for data-processing benchmarks
- Comparison with previous run (if Criterion baseline exists)
Benchmark Groups
| Group | Algorithms |
|---|---|
| sha2 | SHA-256, SHA-384, SHA-512 |
| sha3 | SHA3-256 |
| sm3 | SM3 |
| hmac | HMAC-SHA256, HMAC-SHA512, HMAC-SM3 |
| aes_gcm | AES-128-GCM, AES-256-GCM |
| aes_cbc | AES-128-CBC, AES-256-CBC |
| chacha20 | ChaCha20-Poly1305 |
| sm4_cbc | SM4-CBC |
| sm4_gcm | SM4-GCM |
| rsa | RSA-2048/3072/4096 keygen + sign/verify |
| ecdsa | ECDSA P-256/P-384 sign/verify |
| ed25519 | Ed25519 sign/verify |
| x25519 | X25519 key exchange |
| ecdh | ECDH P-256/P-384 |
| dh | FFDHE-2048/3072/4096 |
| sm2 | SM2 sign/verify |
| mlkem | ML-KEM-512/768/1024 |
| mldsa | ML-DSA-44/65/87 |
Tips
- Use
--save-baseline <name>to save a baseline for later comparison - Use
--baseline <name>to compare against a saved baseline - Results are stored in
target/criterion/