export type LoadPhaseOptions = { url: string; /** Total number of requests to send. */ amount: number; connections: number; /** Sent with every request (compression, cookies, auth). */ headers?: Record; /** * Maximum tolerated ratio of non-2xx responses plus socket errors before * the phase fails. A route that errors under load must fail the run, not * silently measure garbage. Default: 0.01 (1%). */ maxErrorRatio?: number; }; export type LoadPhaseResult = { sent: number; ok2xx: number; non2xx: number; errors: number; timeouts: number; durationSeconds: number; }; export declare class LoadError extends Error { readonly result: LoadPhaseResult; constructor(message: string, result: LoadPhaseResult); } /** * Whether the app answers for params it never prerendered. * * A varying sample value is what makes a keyed leak visible, and on an app with * a closed param set (`generateStaticParams` plus `dynamicParams = false`) it is * also what makes every request a 404. The two look identical in the counters — * a wall of non-2xx — and the honest answer is not a guess: request one value * the marker would produce and one the app is known to serve, and compare. * * Measured on an app with `post-0..post-2` prerendered and `dynamicParams` off: * `/post-0` answers 200, `/post-3` answers 404. Without this probe the run told * the user the fault was in their route, and sent them to inspect a route that * was working correctly. * * Note this branch cannot occur under `cacheComponents`: Next rejects * `dynamicParams` at build time when it is enabled, so those apps always render * on demand. */ export declare function describeUnprerenderedParams(url: string): Promise; /** Runs one bounded load phase and fails when the error budget is exceeded. */ export declare function runLoadPhase(options: LoadPhaseOptions): Promise;