| @@ -15,6 +15,7 @@ type PerfBenchmarkEnv = { · 14 unmodified lines |
| 15 | | 15 | |
| 16 | const TRUE_VALUES = new Set(["1", "true", "yes", "on"]); | 16 | const TRUE_VALUES = new Set(["1", "true", "yes", "on"]); |
| 17 | const FALSE_VALUES = new Set(["0", "false", "no", "off"]); | 17 | const FALSE_VALUES = new Set(["0", "false", "no", "off"]); |
| | 18 | const MAX_BENCHMARK_FOLLOW_UP_PASSES = 5; |
| 18 | | 19 | |
| 19 | function parseBooleanLike(value: string | undefined): boolean | null { | 20 | function parseBooleanLike(value: string | undefined): boolean | null { |
| 20 | const normalized = value?.trim().toLowerCase(); | 21 | const normalized = value?.trim().toLowerCase(); |
| @@ -54,7 +55,8 @@ export function shouldRunOptionalRendererPerfInteractions(env: OptionalRendererT · 33 unmodified lines |
| 54 | export function resolveBenchmarkFollowUpPassCount(env: PerfBenchmarkEnv): number { | 55 | export function resolveBenchmarkFollowUpPassCount(env: PerfBenchmarkEnv): number { |
| 55 | const raw = env.T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES?.trim(); | 56 | const raw = env.T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES?.trim(); |
| 56 | if (raw && /^\d+$/.test(raw)) { | 57 | if (raw && /^\d+$/.test(raw)) { |
| 57 | return Number.parseInt(raw, 10); | 58 | const parsed = Number.parseInt(raw, 10); |
| | 59 | return Math.min(parsed, MAX_BENCHMARK_FOLLOW_UP_PASSES); |
| 58 | } | 60 | } |
| 59 | return isCiEnvironment(env.CI) ? 0 : 1; | 61 | return isCiEnvironment(env.CI) ? 0 : 1; |
| 60 | } | 62 | } |