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.
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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Load Test Dashboard" | Section heading. |
| description | string | undefined | Section intro text below the heading. |
| target | string | "POST https://api.northwind.dev/v1/checkout" | Method and URL under test, shown above the controls. |
| virtualUsers | number | 250 | Virtual user count shown next to the target line. |
| durationLabel | string | "60s" | Target run duration label shown next to the target line. |
| metrics | LoadTestMetrics | none | Static demo metric values shown in the row below the progress bar. |
| className | string | none | Extra 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.
More DevTools Blocks
View all →api-endpoints-sample-call
API Endpoints With Sample Call
Reference list of API endpoints paired with a live sample request and response panel.
cicd-pipeline-status
CI/CD Pipeline Status
Recent CI/CD pipeline runs with per-stage status chips and overall run badges.
code-diff-viewer
Code Diff Viewer
Unified code diff panel with a file header change summary and colored addition/deletion lines.
keyboard-shortcuts-reference
Keyboard Shortcuts Reference
Grouped keyboard shortcut reference with keycap-styled key combos.
performance-waterfall
Performance Waterfall
Network request waterfall chart with cascading timing bars colored by duration.
service-health-board
Service Health Board
Infrastructure status board with a live summary strip and per-service uptime, latency, and health.