|
| 1 | +# Core Benchmark Results (ADR-001 to ADR-018) |
| 2 | + |
| 3 | +**CPU:** AMD Ryzen 9 7950X3D, .NET 10.0.10, Linux elementary OS 8 |
| 4 | +**Date:** 2026-07-26 |
| 5 | +**Toolchain:** InProcessEmitToolchain (BenchmarkDotNet v0.15.8) |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## 1. Concurrency — BatchScheduling |
| 10 | + |
| 11 | +| ConcurrentBatches | BatchSize | Mean | Allocated | |
| 12 | +|-------------------|-----------|-----------|------------| |
| 13 | +| 2 | 4 | 18.12 us | 27.09 KB | |
| 14 | +| 2 | 16 | 71.95 us | 105.09 KB | |
| 15 | +| 4 | 4 | 36.71 us | 54.09 KB | |
| 16 | +| 4 | 16 | 140.05 us | 210.10 KB | |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## 2. Concurrency — ParallelExecution |
| 21 | + |
| 22 | +| Parallelism | Mean | Allocated | |
| 23 | +|-------------|----------|-----------| |
| 24 | +| 2 | 4.324 us | 6.42 KB | |
| 25 | +| 8 | 17.557 us| 25.41 KB | |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## 3. Diagnostics — Overhead |
| 30 | + |
| 31 | +| Method | Mean | Allocated | |
| 32 | +|-----------------------------------------------|----------|-----------| |
| 33 | +| NoDiagnostics_Baseline | 2.237 us | - | |
| 34 | +| AuditHistory_Enabled | 4.974 us | - | |
| 35 | +| CombinedInterceptionAndDiagnostics_Enabled | 5.653 us | 4.01 KB | |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## 4. Diagnostics — Interceptor |
| 40 | + |
| 41 | +| Method | Mean | Allocated | Ratio | |
| 42 | +|----------------------------|----------|-----------|-------| |
| 43 | +| NoInterceptor_Baseline | 2.161 us | 3.12 KB | 1.00 | |
| 44 | +| PassiveInterceptor_Enabled | 2.252 us | 3.30 KB | 1.04 | |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## 5. Engine — Batch Performance |
| 49 | + |
| 50 | +| BatchSize | Mean | Allocated | |
| 51 | +|-----------|-----------|-----------| |
| 52 | +| 10 | 46.73 us | 31.49 KB | |
| 53 | +| 100 | 426.36 us | 308.65 KB | |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## 6. Engine — Commit Performance |
| 58 | + |
| 59 | +| Method | Mean | Allocated | Ratio | |
| 60 | +|-----------------------------|----------|-----------|-------| |
| 61 | +| Commit_Performance_NoPolicy | 4.349 us | 3.00 KB | 1.00 | |
| 62 | +| Commit_Strict_WithPolicy | 5.878 us | 4.44 KB | 1.35 | |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## 7. Engine — Mode Benchmarks |
| 67 | + |
| 68 | +| Method | Mean | Allocated | |
| 69 | +|-------------------------------------|----------|-----------| |
| 70 | +| Simulate_Strict_WithPolicy | 5.303 us | - | |
| 71 | +| ValidateOnly_Strict_WithPolicy | 5.056 us | 4.16 KB | |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +## 8. Engine — Throughput |
| 76 | + |
| 77 | +| Method | StateSize | BatchSize | Mean | Allocated | |
| 78 | +|------------|-----------|-----------|------------|------------| |
| 79 | +| Single | 32 | 8 | 5.142 us | - | |
| 80 | +| Batch | 32 | 8 | 39.899 us | - | |
| 81 | +| Single | 32 | 64 | 5.110 us | - | |
| 82 | +| Batch | 32 | 64 | 312.159 us | - | |
| 83 | +| Single | 1024 | 8 | 5.396 us | - | |
| 84 | +| Batch | 1024 | 8 | 44.314 us | - | |
| 85 | +| Single | 1024 | 64 | 5.461 us | - | |
| 86 | +| Batch | 1024 | 64 | 348.187 us | - | |
| 87 | +| Single | 16384 | 8 | 7.895 us | 67.08 KB | |
| 88 | +| Batch | 16384 | 8 | 63.035 us | 537.68 KB | |
| 89 | +| Single | 16384 | 64 | 7.300 us | 67.08 KB | |
| 90 | +| Batch | 16384 | 64 | 508.349 us | 4297.72 KB | |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## 9. Policy — Evaluation |
| 95 | + |
| 96 | +| Method | Mean | Allocated | Ratio | |
| 97 | +|-----------------------------|----------|-----------|-------| |
| 98 | +| NoPolicy_Baseline | 5.007 us | 3.01 KB | 1.00 | |
| 99 | +| SingleSyncPolicy_Allow | 5.324 us | 3.98 KB | 1.06 | |
| 100 | +| SingleAsyncPolicy_Allow | 5.307 us | 3.98 KB | 1.06 | |
| 101 | +| MultipleMixedPolicies_Allow | 5.607 us | 5.43 KB | - | |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## 10. Results — Creation |
| 106 | + |
| 107 | +| Method | Mean | Allocated | Ratio | |
| 108 | +|--------------------------------|-----------|-----------|-------| |
| 109 | +| Success_NoSideEffects | 93.56 ns | 528 B | 1.00 | |
| 110 | +| Success_SingleSideEffect | 268.92 ns | 792 B | 2.87 | |
| 111 | +| Success_MultipleSideEffects | 897.30 ns | 1960 B | 9.59 | |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## 11. Results — Materialization |
| 116 | + |
| 117 | +| Method | Mean | Allocated | Ratio | |
| 118 | +|----------------------------------|----------|-----------|-------| |
| 119 | +| HistoryEntry_Materialization | 706.5 ns | 896 B | 1.00 | |
| 120 | +| AuditEntry_Materialization | 689.3 ns | 848 B | 0.95 | |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +## 12. Concurrency — GateContention |
| 125 | + |
| 126 | +> ❌ **Not executed** — `SharedStateGate_TwoConcurrentExecutions` timed out under InProcessEmitToolchain. Requires out-of-process execution. |
| 127 | +
|
| 128 | +--- |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## Priority Matrix |
| 133 | + |
| 134 | +### P1 — Must benchmark (missing coverage, core-path risk) |
| 135 | + |
| 136 | +| ADR | Component | Missing | |
| 137 | +|--------|------------------|---------| |
| 138 | +| 010 | Results | 0/2 materialization edge cases | |
| 139 | +| 004 | GateContention | Async blocking gate scenario (InProcess timeout) | |
| 140 | + |
| 141 | +### P2 — Should benchmark (ADRs without any coverage) |
| 142 | + |
| 143 | +| ADR | Component | Gap | |
| 144 | +|--------|-------------------|-----| |
| 145 | +| 009 | Metrics | No benchmarks exist | |
| 146 | +| 016 | MetricsCollection | No benchmarks exist | |
| 147 | +| 018 | DI Registration | No benchmarks exist | |
| 148 | + |
| 149 | +### P3 — Nice-to-have (indirect coverage, low-risk gaps) |
| 150 | + |
| 151 | +| ADR | Component | Current | |
| 152 | +|--------|---------------------------|---------| |
| 153 | +| 011 | ExecutionContext | ✅ indirect | |
| 154 | +| 014 | InMemoryAuditor/HistoryStore | ✅ indirect | |
| 155 | + |
| 156 | +### Performance Watchlist — Items to monitor on regressions |
| 157 | + |
| 158 | +| Benchmark ID | Baseline | Alert if > | |
| 159 | +|---------------------------------|-----------|------------| |
| 160 | +| Commit_Performance_NoPolicy | 4.35 us | 5.5 us | |
| 161 | +| BatchMutation_Commit (32/64) | 312 us | 400 us | |
| 162 | +| BatchMutation_Commit (16384/64) | 508 us | 650 us | |
| 163 | +| SingleMutation_Commit (any) | 5-8 us | 10 us | |
| 164 | +| Policy overhead (sync/async) | 1.06× | 1.20× | |
| 165 | + |
| 166 | +--- |
| 167 | + |
| 168 | +## Coverage Summary |
| 169 | + |
| 170 | +| ADR | Component | Status | |
| 171 | +|--------|---------------------------|--------| |
| 172 | +| 001 | StateChange / ChangeSet | ✅ | |
| 173 | +| 002 | MutationContext | ✅ | |
| 174 | +| 003 | MutationIntent / BlastRadius | ✅ | |
| 175 | +| 004 | Policies / PolicyDecision | ✅ | |
| 176 | +| 005 | Audit abstractions | ✅ | |
| 177 | +| 006 | SideEffects | ✅ | |
| 178 | +| 007 | History | ✅ | |
| 179 | +| 008 | Interceptors | ✅ | |
| 180 | +| 009 | Metrics | ❌ Not benchmarked | |
| 181 | +| 010 | Results | ✅ | |
| 182 | +| 011 | ExecutionContext | 🔶 No dedicated benchmark | |
| 183 | +| 012 | IMutation / IMutationExecutor | ✅ | |
| 184 | +| 013 | MutationEngine | ✅ | |
| 185 | +| 014 | InMemoryAuditor / HistoryStore | 🔶 No dedicated benchmark | |
| 186 | +| 015 | InterceptorPipeline | ✅ | |
| 187 | +| 016 | MetricsCollection | ❌ Not benchmarked | |
| 188 | +| 017 | PolicyRegistry | ✅ | |
| 189 | +| 018 | DI Registration | ❌ Not benchmarked | |
| 190 | + |
| 191 | +**Status:** 36/39 benchmarks completed, 2 not benchmarked (Metrics, DI), 1 timeout (GateContention). |
0 commit comments