# Benchmarks

The command-line benchmark exercises the repository's deterministic clinical
fixtures through the same `redact_with_config` path used by the library. It
reports the number of fixture cases, processed documents, input characters,
findings, elapsed wall-clock milliseconds, and a derived characters-per-ms
rate.

## Reproduce

```text
moon run cmd/main -- --benchmark=100
```

The benchmark uses three fixed documents from `synthetic_evaluation_cases` /
`benchmark_fixture` and repeats the workload 100 times per case. Timing comes
from `@env.now()` inside the CLI; it is therefore useful for comparing builds
on the same machine, not as a cross-machine performance claim.

## Local measurement

Measured on 2026-08-24 with `moon 0.1.20260819`, `moonc v0.10.9+6e6c44045`:

| Run | Cases | Documents | Input characters | Findings | Elapsed (ms) | Characters/ms |
| ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 1 | 3 | 500 | 63,500 | 3,600 | 2,338 | 27 |
| 2 | 3 | 500 | 63,500 | 3,600 | 1,846 | 34 |
| 3 | 3 | 500 | 63,500 | 3,600 | 1,510 | 42 |

The output is intentionally deterministic for workload size and finding
counts; elapsed time varies with the host and build cache state.
