# 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-19 with `moon 0.1.20260807`, `moonc v0.10.7+bc794d341`:

| Run | Cases | Documents | Input characters | Findings | Elapsed (ms) | Characters/ms |
| ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 1 | 3 | 500 | 63,500 | 3,600 | 652 | 97 |
| 2 | 3 | 500 | 63,500 | 3,600 | 623 | 101 |
| 3 | 3 | 500 | 63,500 | 3,600 | 649 | 97 |

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