diff --git a/perf/efps/helpers/measureFpsForInput.ts b/perf/efps/helpers/measureFpsForInput.ts index 4b0c584c795..93f13b1dc37 100644 --- a/perf/efps/helpers/measureFpsForInput.ts +++ b/perf/efps/helpers/measureFpsForInput.ts @@ -74,9 +74,9 @@ export async function measureFpsForInput(input: Locator): Promise { return matchingEvent.timestamp - inputEvent.timestamp }) - const p50 = 1000 / calculatePercentile(latencies, 0.5) - const p75 = 1000 / calculatePercentile(latencies, 0.75) - const p90 = 1000 / calculatePercentile(latencies, 0.9) + const p50 = Math.min(1000 / calculatePercentile(latencies, 0.5), 60) + const p75 = Math.min(1000 / calculatePercentile(latencies, 0.75), 60) + const p90 = Math.min(1000 / calculatePercentile(latencies, 0.9), 60) return {p50, p75, p90, latencies} } diff --git a/perf/efps/helpers/measureFpsForPte.ts b/perf/efps/helpers/measureFpsForPte.ts index ffa233e9064..ee54cd719f1 100644 --- a/perf/efps/helpers/measureFpsForPte.ts +++ b/perf/efps/helpers/measureFpsForPte.ts @@ -86,9 +86,9 @@ export async function measureFpsForPte(pteField: Locator): Promise { return matchingEvent.timestamp - inputEvent.timestamp - matchingEvent.textContentProcessingTime }) - const p50 = 1000 / calculatePercentile(latencies, 0.5) - const p75 = 1000 / calculatePercentile(latencies, 0.75) - const p90 = 1000 / calculatePercentile(latencies, 0.9) + const p50 = Math.min(1000 / calculatePercentile(latencies, 0.5), 60) + const p75 = Math.min(1000 / calculatePercentile(latencies, 0.75), 60) + const p90 = Math.min(1000 / calculatePercentile(latencies, 0.9), 60) return {p50, p75, p90, latencies} }