diff --git a/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/Description.mdx b/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/Description.mdx index 59997c51..0b9f052a 100644 --- a/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/Description.mdx +++ b/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/Description.mdx @@ -1,4 +1,4 @@ -These CSR browser performance tests use Lighthouse to measure paint timings and a controlled navigation interaction. +These CSR browser performance tests use Lighthouse to measure paint timings and a controlled navigation interaction. The interaction is also scored as [work to commit](/methodology/#interaction-work-to-commit) from the same trace. Methodology: [Client Side Rendered Tests (Lighthouse)](/methodology/#client-side-rendered-tests-lighthouse). diff --git a/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/LighthouseFrameworkClientRenderedVersionCharts.astro b/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/LighthouseFrameworkClientRenderedVersionCharts.astro index 3c85d2a5..c32c605d 100644 --- a/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/LighthouseFrameworkClientRenderedVersionCharts.astro +++ b/packages/docs/src/benchmarks/lighthouse-client-side-rendered-tests/LighthouseFrameworkClientRenderedVersionCharts.astro @@ -4,7 +4,9 @@ import { prepareLighthouseClientSideRenderedTestsFcpMsHistory, prepareLighthouseClientSideRenderedTestsFirstPaintMsHistory, prepareLighthouseClientSideRenderedTestsInteractionHistory, + prepareClientSideRenderedInteractionWorkHistory, } from '../../lib/prepare-chart' +import { INTERACTION_WORK } from '../../lib/interaction-phases' import VersionLineChart from '../../components/VersionLineChart.astro' import InteractionHistoryChart from '../shared/InteractionHistoryChart.astro' @@ -16,6 +18,8 @@ const { versions } = Astro.props const interactionData = prepareLighthouseClientSideRenderedTestsInteractionHistory(versions) +const interactionWorkData = + prepareClientSideRenderedInteractionWorkHistory(versions) --- +{ + interactionWorkData.length > 0 ? ( + + ) : null +} { interactionData.length > 0 ? ( +{ + interactionWorkData.length > 0 ? ( + + ) : null +} { interactionData.length > 0 ? ( ({ +const { title, data, metric = LIGHTHOUSE_INTERACTION } = Astro.props +const series = metric.parts.map(({ key, label, color }) => ({ key, label, color, @@ -37,7 +41,7 @@ const chart1Table = prepareInteractionBreakdownTable(chart1) defaultValue="chart" > - + diff --git a/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro b/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro index a3d891bb..1253f6a0 100644 --- a/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro +++ b/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro @@ -1,22 +1,23 @@ --- -import { INTERACTION_PHASES } from '../../lib/interaction-phases' +import { + LIGHTHOUSE_INTERACTION, + type InteractionMetric, +} from '../../lib/interaction-phases' interface Props { title?: string + metric?: InteractionMetric } -const { title } = Astro.props +const { title, metric = LIGHTHOUSE_INTERACTION } = Astro.props ---
{title &&

{title}

} -

- Total latency is split into the three consecutive phases reported by - Lighthouse. -

+

{metric.summary}

    { - INTERACTION_PHASES.map(({ label, description }) => ( + metric.parts.map(({ label, description }) => (
  • The {label.toLowerCase()}, {description}
  • @@ -25,7 +26,7 @@ const { title } = Astro.props