benchmarklisted
Install: claude install-skill TsukiNi22/ai-utils
# Benchmark & profiling
`SKILL_DIR` = the directory of this file. Scripts: `scripts/tools.sh` (tools available / install commands),
`scripts/profile.sh` (build + measures), `scripts/hotspots.py` (tables for the report).
Reports: the `report` skill. Nothing is committed, the outputs stay in `/tmp/benchmark-*` unless the user asks.
## 1. Ask (one AskUserQuestion call, French) - only what the request doesn't say
- **Scénario mesuré**: the command(s) and the inputs, representative of the real use (a big input, the test suite,
a benchmark target...); propose the obvious one from the project (`./<binary> <typical args>`, the GTest binary).
- **Ce qui compte**: temps CPU / latence, mémoire, les deux.
- **Profondeur**: `Rapide (perf + temps) (Recommandé)` · `Complète (+ callgrind + mémoire, plus lent)`.
The report format is asked by the `report` skill (once).
## 2. Tools
```bash
bash SKILL_DIR/scripts/tools.sh
```
Lists `perf`, `hyperfine`, `valgrind`, `heaptrack`, `flamegraph`, `/usr/bin/time`, `py-spy` with the install command of
the OS and the `perf_event_paranoid` level. When a tool **useful for the chosen depth** is missing, ask
(AskUserQuestion): `Installer (je lance la commande)` · `Tu les installes (commande donnée)` · `Continuer sans`.
Never install without a yes. Root commands go through the sudo method of the environment (on this computer:
`SUDO_ASKPASS=~/.local/bin/sudo-askpass sudo -A <command>`, see the global instructions). `perf_event_paranoid` > 2:
same question