Skip to main content
Reference · Information

senkani bench

Live

Reproduce the published 80.37× compression figure on your hardware. The suite drives 10 task fixtures through 7 feature configs, default 256 iterations.

Syntax

senkani bench [savings] [--iterations N]
senkani bench pii [--warm-iterations N] [--threshold X] [--json path] [--strict]

Behavior

Reproduces the 80.37× fixture-suite figure on your hardware. Writes JSON results; prints a summary.

bench hosts two subcommands. savings is the default — bare senkani bench runs the token-savings suite exactly as before. pii is the headless PII-classifier bench: it times the classifier decode path (synthetic one-hot logits through the real BIOES/Viterbi decoder) with an injected stub backend — no model load, no network — and emits three rows in the standard bench report format: pii_cold_start (backend load + first call), pii_warm_call (median of N reuse calls), and pii_output_shape (span-shape assertion sweep with a quality gate). Cold/warm rows carry estimated confidence — stub latency shape, not real-model perf.

Example

$ senkani bench --iterations 256
$ senkani bench pii --warm-iterations 32 --json pii-bench.json

Flags

Flag
Description
--iterations N
Default 256.
--json
Emit full results.
--scenario <name>
Run one scenario only.

Flags — bench pii

Flag
Description
--warm-iterations N
Warm reuse-call iterations after the cold call (default 32).
--threshold X
PII softmax floor handed to the backend (default 0.85).
--json <path>
Write the report as JSON (per-row timings in durationMs).
--strict
Exit non-zero if the output-shape gate fails.
Source: Sources/Bench/BenchmarkScenarios.swift (orchestrator), Sources/Bench/BenchmarkTasks.swift (task fixtures), Sources/Bench/BenchBaseline.swift (baseline storage), Sources/Bench/PIIBenchRunner.swift (bench pii harness)