perf: enforce journey budgets and reference traces

This commit is contained in:
2026-09-02 07:48:02 +03:00
parent 8089d061ec
commit f4cf9fc77e
25 changed files with 1432 additions and 23 deletions

View File

@@ -13,6 +13,14 @@ if (requestsTestFault) {
await installAuthorizedTestHooks();
}
const requestsPerformanceTrace = TEST_BUILD
&& new URL(location.href).searchParams.get('__portfolio_performance') === 'drive-trace.v1'
&& new URL(location.href).searchParams.has('__portfolio_test_token');
if (requestsPerformanceTrace) {
const { installAuthorizedPerformanceInstrumentation } = await import('./testing/performance-instrumentation');
await installAuthorizedPerformanceInstrumentation();
}
export const readProductionInputsSnapshot = (source: Document): Readonly<ProductionInputs> => {
const snapshot = source.getElementById('portfolio-inputs');
if (