Performance benchmarks
Performance benchmarks
Section titled “Performance benchmarks”These numbers come from a single recorded run of the hot-path benchmark against the real modules: no mocks on the measured leg. They are repo-measured engineering bounds, published so you can see the shape of each measured path. They are not a capacity claim. Re-run the benchmark to reproduce on your own hardware, and do not compare numbers across machines or across runs.
What is measured
Section titled “What is measured”bench/run_bench.py
exercises the production paths end to end:
| Path | Module under measurement |
|---|---|
gate_allow / gate_deny |
raucle.capability.CapabilityGate.check : schema-bound gate, allow vs type-confused deny |
receipt_emit |
raucle.verdicts.VerdictSigner.issue : Ed25519 JWS receipt |
receipt_append |
raucle.receipt_store.SegmentedReceiptStore.append_line : chain-of-record JSONL write |
index_append |
raucle.receipt_index.ReceiptIndex.index_receipt : SQLite projection |
siem_forward |
raucle.siem.SIEMSink.append : ECS JSONL line, flushed per event |
sink_submit |
raucle.async_receipt_sink.AsyncReceiptSink.submit : bounded-queue async receipt path |
Methodology
Section titled “Methodology”PYTHONPATH=<repo>python bench/run_bench.py --iter N --json bench/results/<date>.json- Per path: N single-shot calls timed with
time.perf_counter_ns(wall clock; CPython, so the first iterations sit inside the recorded distribution, there is no warm-up filter). - Reported statistics: p50, p99 (interpolated percentile over the sorted latency distribution), mean, and ceiling throughput = 1/mean. The ceiling is an upper bound for a single-threaded loop, not a sustained-load figure.
- The async receipt sink is additionally measured as a submit-side
wall-clock rate for N
submitcalls (async_submit_rate_ops_s) and the background writer’s drain rate for the same N receipts (async_drain_write_rate_ops_s), withoverflow_eventsasserted 0. Overflow is a named failure contract (receipt_sink_overflow) covered by tests, not a benchmark condition. - The environment is fresh temporary directories per run; the SIEM file handle, the SQLite WAL connection and the receipt store are real files on the OS page cache.
Hardware of the recorded run
Section titled “Hardware of the recorded run”The recorded numbers below come from exactly this machine and this run:
- Intel Core i5-8250U (8 threads, 1.60 GHz base / 3.4 GHz max), 23 GiB RAM
- Linux 7.2.8-9-omarchy
- CPython 3.14.9 (repo venv)
- Single-writer benchmark process, no load shaping
Recorded results (2026-11-09, —iter 1500)
Section titled “Recorded results (2026-11-09, —iter 1500)”Source of record:
bench/results/x5-2026-11-09.json,
committed in the repository: re-check against it rather than trusting
this table.
| Path | p50 (µs) | p99 (µs) | ceiling ops/s |
|---|---|---|---|
| gate_allow | 237.7 | 472.8 | 3,792 |
| gate_deny | 233.1 | 521.6 | 3,836 |
| receipt_emit | 81.5 | 169.9 | 10,959 |
| receipt_append | 10.1 | 19.7 | 94,172 |
| index_append | 35.4 | 68.8 | 25,780 |
| siem_forward | 12.6 | 28.7 | 73,957 |
| sink_submit | 1.0 | 2.7 | 939,712 |
The receipt sink bounds
Section titled “The receipt sink bounds”Async sink, same run: submit-side rate 8,065 ops/s for the submitting
loop (the loop also signs each receipt in-thread; the submit primitive
itself peaks at ~939k ops/s with pre-built envelopes), and a background
drain/write rate of 8,747,019 ops/s. That drain rate is write-ahead: the
queue absorbs work faster than the writer consumes it, which is exactly
the situation the bounded queue and the named receipt_sink_overflow
failure event exist to govern. Overflow events in the run: 0.
Reading the numbers honestly
Section titled “Reading the numbers honestly”- The gate ceiling (~3.8k ops/s) is dominated by per-call JWS verification. Receipt emit (~11k ops/s) and chain append are individually much cheaper; the gate is the hot path’s ceiling, not the sinks.
- Ceiling throughput is a single-threaded best case. Sustained
multi-client throughput, fsync behaviour on non-page-cached storage and
garbage-collection pauses are not measured here. Do not quote
ceiling_ops_sas a capacity number. - The async sink’s caller-visible cost (p50 1.0 µs, ~939k ops/s ceiling)
is the point of the design: decoupling moves the receipt-emit and
append cost off the gate’s thread, at the price of a bounded queue
whose overflow is a named failure (see
tests/test_bench.py).