Scale hidden real PTY pressure benchmarks (#4812)

This commit is contained in:
Neil 2026-06-07 11:01:02 -07:00 committed by GitHub
parent 129b4c755f
commit f9e8616bb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 43 additions and 8 deletions

View File

@ -9,6 +9,8 @@ const env = {
process.env.ORCA_E2E_OPENCODE_SCALE_CROSS_WORKSPACE_PANES ?? '10,25,50,100',
ORCA_E2E_OPENCODE_SCALE_PRESSURE_PANES:
process.env.ORCA_E2E_OPENCODE_SCALE_PRESSURE_PANES ?? '25,50',
ORCA_E2E_OPENCODE_SCALE_HIDDEN_PRESSURE_PANES:
process.env.ORCA_E2E_OPENCODE_SCALE_HIDDEN_PRESSURE_PANES ?? '25',
ORCA_E2E_OPENCODE_FRAME_COUNT: process.env.ORCA_E2E_OPENCODE_FRAME_COUNT ?? '60'
}
const extraArgs = process.argv.slice(2)

View File

@ -112,6 +112,7 @@ export async function runHiddenRealPtyPressureScenario<
TScheduler
>({
deps,
annotationSuffix,
hiddenPaneCount,
pressureOutputChars,
pressureStartDelayMs,
@ -120,6 +121,7 @@ export async function runHiddenRealPtyPressureScenario<
orcaPage
}: {
deps: HiddenPressureDeps<TMeasurement, TDebug, TScheduler, TMainPressure, TAckGate>
annotationSuffix?: string
hiddenPaneCount: number
pressureOutputChars: number
pressureStartDelayMs: number
@ -181,7 +183,7 @@ export async function runHiddenRealPtyPressureScenario<
const ackGate = await deps.readTerminalAckGateDebug(orcaPage)
deps.annotateTypingMeasurement(
testInfo,
'opencode-hidden-real-pty-pressure-typing',
`opencode-hidden-real-pty-pressure-typing${annotationSuffix ?? ''}`,
hiddenPanes.length + 1,
measurement,
debug,
@ -207,7 +209,7 @@ export async function runHiddenRealPtyPressureScenario<
runId
)
testInfo.annotations.push({
type: 'opencode-hidden-real-pty-restore',
type: `opencode-hidden-real-pty-restore${annotationSuffix ?? ''}`,
description: `panes=${hiddenPanes.length + 1} restore=${restoreLatencyMs.toFixed(
1
)}ms hiddenSkippedChars=${debug?.hiddenRendererSkippedChars ?? 0} mainPeakInFlightChars=${

View File

@ -170,6 +170,9 @@ const SCALE_CROSS_WORKSPACE_PANES = readPositiveIntList(
'ORCA_E2E_OPENCODE_SCALE_CROSS_WORKSPACE_PANES'
)
const SCALE_PRESSURE_PANES = readPositiveIntList('ORCA_E2E_OPENCODE_SCALE_PRESSURE_PANES')
const SCALE_HIDDEN_PRESSURE_PANES = readPositiveIntList(
'ORCA_E2E_OPENCODE_SCALE_HIDDEN_PRESSURE_PANES'
)
function interactivePromptScript(runId: string): string {
return `
@ -773,15 +776,18 @@ test.describe('Artificial OpenCode terminal load', () => {
testInfo
})
})
test('keeps typing responsive while hidden real PTYs are ACK-backpressured', async ({
orcaPage,
testRepoPath
}, testInfo) => {
async function runConfiguredHiddenRealPtyPressureScenario(
orcaPage: Page,
testRepoPath: string,
testInfo: TestInfo,
hiddenPaneCount: number,
annotationSuffix?: string
): Promise<void> {
await runHiddenRealPtyPressureScenario({
orcaPage,
testRepoPath,
hiddenPaneCount: HIDDEN_PRESSURE_PANES,
annotationSuffix,
hiddenPaneCount,
pressureOutputChars: PRESSURE_OUTPUT_CHARS,
pressureStartDelayMs: HIDDEN_PRESSURE_START_DELAY_MS,
testInfo,
@ -800,7 +806,32 @@ test.describe('Artificial OpenCode terminal load', () => {
writeInteractivePromptScript
}
})
}
test('keeps typing responsive while hidden real PTYs are ACK-backpressured', async ({
orcaPage,
testRepoPath
}, testInfo) => {
await runConfiguredHiddenRealPtyPressureScenario(
orcaPage,
testRepoPath,
testInfo,
HIDDEN_PRESSURE_PANES
)
})
for (const paneCount of SCALE_HIDDEN_PRESSURE_PANES) {
test(`keeps hidden restore responsive with ${paneCount} ACK-backpressured real PTYs`, async ({
orcaPage,
testRepoPath
}, testInfo) => {
await runConfiguredHiddenRealPtyPressureScenario(
orcaPage,
testRepoPath,
testInfo,
paneCount,
`-${paneCount}`
)
})
}
for (const paneCount of SCALE_CROSS_WORKSPACE_PANES) {
test(`keeps typing responsive with ${paneCount} hidden cross-workspace OpenCode panes`, async ({