Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Percentile Ruler Load Test Results Block for React

Three load test runs on one 0 to 800 ms ruler: a line from p50 to p99 with marks at p50, p95 and p99 and a shared SLO line, beside each run's requests per second, error rate and a Pass or Fail badge.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A load test block for React with Base UI. A start-aligned header counts the runs that held the SLO ("2 of 3 load tests held the 500 ms SLO"). One inset frame has two columns. At the start, a shared axis from 0 to 800 ms and a row per release: a line from the median to the p99, a solid dot at p50, a ring at p95 and a solid square at p99, with one vertical line through every row at the 500 ms SLO and At the end, behind a divider, each run's facts: requests per second, the error rate, the three values in milliseconds and a Pass or Fail badge with how far the p99 sits from the SLO. A run fails when its p99 is over the SLO or its error rate is over 0.1%; the error rate is computed from the errors and the requests sent, the ruler's scale from the slowest p99, and the verdicts and the title from the runs. On a phone each run's facts sit under its track. It's built from Badge, Status and Guides, with plain CSS for the drawing and your theme's tokens for every colour.

FAQ

How do I change the runs, the SLO or the error limit?

Edit RUNS (each has a version, a date, the p50, p95 and p99 in milliseconds, the sustained requests per second and the number of failed requests), SLO (milliseconds) and MAX_ERRORS (percent). The error rate is errors / (requests per second x 600), the axis runs from 0 to the slowest p99 with some room rounded up to the next 200 ms, the marks are shares of it, and the count in the title is the number of runs that pass, so nothing is kept in step by hand. The numbers are example data.

Why are the percentiles three different shapes?

A solid dot (p50), a ring (p95) and a solid square (p99) stay apart without colour, even where two of them sit close together, and the legend names them. The three values are also written in each run's facts, so nothing depends on seeing the marks.

How does a failing run show?

v2.7 has a p99 of 562 ms, 62 ms over the SLO, so its square sits past the vertical line, its badge says Fail with the destructive dot, and the line under it reads "p99, 62 ms over the SLO". The dot is the block's only warning mark, and the word carries the meaning.

What changes on a phone?

Each run's facts move under its track as a row of the same figures, the axis keeps its ruler with fewer labels (0, 400 and 800) and the hairlines thin out to match. The version and date stay at the start of every row, and nothing scrolls sideways at 320 pixels.

How does a screen reader read it?

The ruler's drawing is hidden from assistive technology: each run is a list item with its version as a heading, its p50, p95 and p99 as text in a description list of requests per second, error rate and the verdict with its distance from the SLO.

Does it work in a right-to-left layout?

Yes. The ruler is a measurement, so it keeps a left-to-right direction and small times stay at the start; the figures, the percentages and the percentile values are isolated so they keep their order, and the facts column follows the page's direction.

  • Pro

    A single bar that slices a 250 ms request budget by hop (edge, auth, database, render), a switch between two releases that re-slices it, and a four-cell band with each hop's milliseconds and its change.

  • Pro

    Paired Bars Queue Metrics

    Metrics and charts

    Five message queues as rows of paired bars, the release before as an outline and the current release solid, with a three-way switch between throughput, lag and dead letters, and a header that counts the lagging queues.

  • Pro

    Release Band SLA Compliance

    Incidents and uptime

    A band of three release cells for a managed-service reporting product: uptime, p95 response and first reply with the target beside the actual, a check or a ring for each, and a breach count in each foot.

  • Pro

    A response-time histogram of ten 50 ms buckets with a smoothed density curve over them, a solid median line and a dashed mean line, and a band of three figures under it: mean, median and 90th percentile.

  • Pro

    A latency line against its 300 ms SLO for an API monitor: the stretches over the threshold are drawn thicker with ringed points, and a rail repeats the breaches, the time over and the worst reading in text.

  • Pro

    Tabbed Window Uptime History

    Incidents and uptime

    A tabbed window of ninety-day uptime for an uptime monitor: one tab per service, a large uptime figure that rolls to the new service, a strip of ninety daily bars and a three-row table of incidents.