Component guideEditable source

Build duration

Paired cold and cached runs, time savings, and an explicit budget.

On this page4 sectionsBack to top

Compare cold and cached runs of the same builds. The period control updates arithmetic means, paired time savings, and the budget-breach count. Hiding a plotted series does not change the summary's comparison population. All measurements are illustrative.

Live preview
Loading preview...

#Installation

Complete the base setup. Chart and Card are installed as dependencies without reinstalling your theme.

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/chart-build-duration.json

#Usage

import ChartBuildDuration from "@/components/ui/chart-build-duration";

export default function BuildReport() {
  return <ChartBuildDuration />;
}

#API reference

The recipe has no required props. Edit its installed data and presentation directly.

Source / controlPurpose
buildsPaired cold/cached duration values in seconds.
budgetCold-run threshold, initially 220 seconds.
Build periodAll six builds or the latest three.
Visible build seriesBoth, cold only, or cached only.
View build dataBoth paired values and cold-minus-cached time saved.

The vertical scale remains fixed when hiding a series so apparent differences are not rescaled. Adjust its domain when introducing other measurements. Means require a nonempty array. The fixed sample is not a benchmark or a confidence interval.

#Accessibility

Solid lines with filled dots and dashed lines with open dots distinguish series without relying on color. The dotted horizontal line is the stated budget. Controls, visible summaries, and the exact table work without hover; the chart is labeled and has no entrance animation.