Benchmarking
This repository includes phpbench profiles for common ABAC policy shapes and for degraded latency conditions.
Available benchmark scenarios
- Flat AND chain with multiple resource checks.
- Nested OR chain with two child branches.
- Mixed resource + actor checks.
Bench sources:
benchmarks/AbacEvaluationBench.phpfor normal in-process evaluation.benchmarks/AbacLatencyEvaluationBench.phpfor latency-simulated evaluation.
Run benchmarks
From repository root:
composer bench
Quick local feedback:
composer bench:quick
Latency-simulated runs:
composer bench-latency
Quick latency feedback:
composer bench-latency:quick
Notes
- Benchmarks use in-memory SQLite for repeatable local runs.
- The normal suite measures package overhead and stays in the low-ms range.
- The latency suite adds 100 ms of synthetic delay per evaluation to model bad conditions.
- Results are best used for relative comparisons between changes.
- For release comparisons, run on a quiet machine with consistent CPU settings.