Commit 694792a
authored
Benchmark/governance overhead (#792)
* feat(benchmarks): add governance overhead benchmark (#720)
- Benchmark script measuring p50/p95/p99 latency across all governance layers
- Real implementations: PolicyEvaluator, TrustPolicyEvaluator, AuditLog,
CredentialManager, RingEnforcer, DeltaEngine
- 1000+ iterations per measurement using time.perf_counter()
- E2E governed vs ungoverned comparison
- Two charts: latency by component and overhead breakdown
- Full-stack governance overhead: 0.066ms p50 / 0.416ms p99
- Audit write (Merkle) dominates at 73% of total overhead
Closes #720
Signed-off-by: Anubhav Lakra <anubav@ramboll.dk>
* test(benchmarks): add unit tests for governance overhead benchmark
- 19 tests across 4 classes: TestBenchSync, TestGovernedVsUngoverned,
TestSaveJson, TestGenerateCharts
- All pass in under 2 seconds using n=10 iterations
- Covers p50<=p95<=p99 invariants, governed>ungoverned latency,
JSON output structure, and chart file generation
Signed-off-by: AnubhavLakra10 <a4anubhavlakra@gmail.com>
---------
Signed-off-by: Anubhav Lakra <anubav@ramboll.dk>
Signed-off-by: AnubhavLakra10 <a4anubhavlakra@gmail.com>1 parent 8cfdb81 commit 694792a
7 files changed
Lines changed: 1469 additions & 0 deletions
File tree
- benchmarks
- results
- tests
- docs/benchmarks
- charts
0 commit comments