Commit 38cefb6
fix: validate AWF_BENCHMARK_ITERATIONS env var input (#1873)
If AWF_BENCHMARK_ITERATIONS is non-numeric (NaN) or <= 0, the benchmark
script would produce an empty values array causing stats() to throw.
Validate and clamp to a positive integer, falling back to the default
(30) with a clear stderr warning when the input is invalid.
Follow-up to #1870 addressing Copilot review feedback.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a554e4a commit 38cefb6
1 file changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
24 | 43 | | |
25 | 44 | | |
26 | 45 | | |
| |||
0 commit comments