Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SGizek/Raiku/llms.txt
Use this file to discover all available pages before exploring further.
raiku bench provides a consistent interface for running benchmarks against any installed Raiku package, regardless of language. It resolves the package’s cache directory, auto-detects the appropriate benchmarking tool for the package’s language, and streams the results directly to your terminal. For Python packages, raiku bench also performs a file-based discovery step — scanning src/ for bench_*.py or benchmark*.py files before falling back to the language-level runner. Exit codes match the benchmark runner’s, making it scriptable for regression detection in CI.
Usage
Arguments
| Argument | Description |
|---|---|
PACKAGE | Name of the installed package to benchmark |
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--version | — | latest installed | Benchmark a specific installed version |
--runner | — | auto-detected | Override the benchmark runner (space-separated command string) |
--count | -n | runner default | Iteration count — passed to the runner where supported (currently Python) |
Auto-Detection by Language
| Language | Runner | Command |
|---|---|---|
| Python | pytest-benchmark (file discovery first) | python -m pytest --benchmark-only -v |
| Python (fallback) | timeit | python -m timeit -n 1000 pass |
| Rust | cargo bench (criterion) | cargo bench |
| C | make bench | make bench |
| C++ | cmake bench | cmake --build build --target bench |
| C++ (fallback) | make bench | make bench |
| Zig | zig build bench | zig build bench |
| Java | mvn benchmark | mvn exec:java -Dbenchmark=true -q |
| C# | dotnet bench | dotnet run -c Release |
| Go | go test -bench | go test -bench=. -benchmem -run=^$ ./... |
raiku bench first scans src/ for files matching bench_*.py or benchmark*.py. If found, the first matching file is executed directly with python <file> before any other runner is tried.
For Rust packages,
cargo bench requires that the Cargo.toml defines at least one [[bench]] section. Packages that do not ship benchmarks will exit with an error from Cargo, not from Raiku.Behavior
- Benchmarks run inside the package’s cache directory (
~/.raiku/cache/<Language>/<name>/<version>/). - The selected runner name and full command are printed before execution.
- The exit code of
raiku benchmatches the benchmark runner’s exit code. - If no runner binary is found for the language,
raiku benchprints an actionable message and exits cleanly. - The
--countflag is currently forwarded only for Python runners.