Staaarter

Load Test Dashboard

An API performance-testing interface: a target request line, a Start/Stop control pair, an animated progress bar for the current run, and a five-up metrics row covering requests per second, success rate, P95/P99 latency, and error count. Built for load-testing tool docs and internal performance dashboards.

By Staaarter Team
DevTools
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/load-test-dashboard.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools24.tsx instead.

Usage

The file also exports devtools24Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Devtools24, devtools24Demo } from "@/components/blocks/devtools/devtools24";

export default function Page() {
  return <Devtools24 {...devtools24Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Load Test Dashboard"Section heading.
descriptionstringundefinedSection intro text below the heading.
targetstring"POST https://api.northwind.dev/v1/checkout"Method and URL under test, shown above the controls.
virtualUsersnumber250Virtual user count shown next to the target line.
durationLabelstring"60s"Target run duration label shown next to the target line.
metricsLoadTestMetricsnoneStatic demo metric values shown in the row below the progress bar.
classNamestringnoneExtra classes for the outer section element.

Types

type LoadTestMetrics = {
  rps: string;
  successRate: string;
  p95Latency: string;
  p99Latency: string;
  errorCount: string;
};

Behavior notes

  • The Start/Stop pair and progress bar are real local state ("use client"): clicking Start resets progress to 0 and begins a setInterval that adds a fixed 4% every 200ms; clicking Stop, or the bar reaching 100%, clears the interval and re-enables Start.
  • This is a local animated simulation with fixed demo numbers, not a real load test. No network requests are made, nothing is measured, and the RPS/success rate/latency/error metric cards never change, before, during, or after a run.
  • The metric cards are intentionally static regardless of run state to keep the block simple; treat them as illustrative example output, not a live recalculation tied to progress.
  • Start is disabled while a run is in progress and Stop is disabled while idle, so the two buttons are mutually exclusive at all times.
  • The interval always starts from a fixed 0% on every Start click; there is no Date.now()-based timing or random jitter anywhere in the simulation.