# Stat-stale index performance proof

Run `vp i` in each checkout before measurement. Use the same machine for both.

```sh
python3 measure.py <base-checkout> <new-base-output-directory>
python3 measure.py <head-checkout> <new-head-output-directory>
```

The driver starts and stops a real T3 Code server from source, with isolated fresh data and `--dev-url` to enable the built-in Replay provider. It warms the provider with `default`, then uses the repository's recorded `todo-list` transcript. No substitute provider or Git implementation is used.

Each side creates a committed synthetic checkout: 200 directories, 100 files each, 4096 bytes per file. System/global Git config is disabled and fsmonitor is off. After provider warmup, every file's mtime is touched once, without changing bytes. Nine successive new threads run the same recorded first turn. The first read is reported but excluded from the steady-state median; the following eight are measured without another touch or plain Git status.

Git Trace2 PERF records actual server Git subprocess elapsed times. Samples include post-turn checkpoint, status and Changes work: after the CLI returns, the driver waits for trace activity to settle for one second before advancing. Only trace files identifying the synthetic checkout are included in totals. Summed subprocess time measures Git work, not end-to-end latency or CPU time; parallel commands can overlap. Individual command times and CLI elapsed times are retained in JSON.

Validation checks completed turns, identical replies, clean status, unchanged HEAD, unchanged staged index tree, and unchanged content hash. The final validation disables optional locks. It cannot repair the stale index during measurement.

`render.py` renders the measured JSON into a comparison graphic. `package-traces.py` packages traces after replacing private paths and process ancestry; the measurements retain commands with generic fixture/checkout/run placeholders. No application database or secrets are included in uploaded evidence.
