Files
orca/tests/e2e/helpers/electron-shutdown-timing.ts
Neil 39815a086f Reduce CI import, frame-capture, teardown, and shard costs (#28879)
* Avoid unused module imports and trim cosmetic test coverage

* Capture hidden popup frames and attach CDP before guest creation

* Overlap relay test projects within the existing worker budget

* Consolidate native preparation and add an opt-in transform cache comparison

* Release inherited debugger sockets during final E2E teardown

* Refresh unit scheduling weights from all five qualified ARM shards

* Avoid retaining unasserted RPC call history in the delivery model

* Use the supported unconditional background wait syntax

* Overlap unconditional output upload with native preparation

* Verify relay integration stays enabled for ordinary unit callers
2026-10-14 17:10:55 -07:00

22 lines
541 B
TypeScript

type ShutdownPhase = 'close' | 'daemon-cleanup' | 'profile-removal'
export function recordElectronShutdownTiming(
phase: ShutdownPhase,
started: number,
details: Record<string, number | string | boolean | null | undefined> = {}
): void {
if (
process.env.ORCA_E2E_SHUTDOWN_TIMING !== '1' &&
process.env.ORCA_E2E_FORWARD_APP_LOGS !== '1'
) {
return
}
console.log(
`[e2e:shutdown] ${JSON.stringify({
phase,
elapsedMs: Number((performance.now() - started).toFixed(3)),
...details
})}`
)
}