Commit 3e0e7e8
committed
restore: bring back automatic performance quality gate from original benchmark
WHAT WAS LOST:
- Original script had automatic thresholds: avg_ms <= 3.5ms, peak_kb <= 1536KB
- My refactor removed quality gate (only artifact for review)
RESTORED:
- Thresholds via env vars: BENCH_MAX_AVG_MS, BENCH_MAX_MEM_KB
- Grep-based validation from PHPBench aggregate output
- CI fails if thresholds exceeded (automatic regression detection)
IMPROVEMENTS OVER ORIGINAL:
- PHPBench: warmup iterations eliminate JIT startup cost
- Multiple revisions (10) for statistical confidence
- Two benchmark cases: simple (typical) + complex (worst case)
- JSON artifact for detailed analysis
THRESHOLDS JUSTIFIED:
- Original: avg_ms <= 3.5ms (single case)
- New: avg_ms <= 5.0ms (average of simple + complex, higher allowance for complexity)
- Memory: 2048KB (conservative upper bound)
This restores the 'teeth' that quality gate should have had.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent a13c8d4 commit 3e0e7e8
1 file changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
36 | 54 | | |
37 | | - | |
| 55 | + | |
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
| |||
0 commit comments