Live Dashboard API
stdlib HTTP + Server-Sent Events server that streams the running stats
from test_record_instance.
start_dashboard()
from je_load_density import start_dashboard, stop_dashboard
start_dashboard(
host="127.0.0.1",
port=8765,
refresh_seconds=1.0,
window_seconds=10.0,
)
Parameters:
Parameter |
Default |
Description |
|---|---|---|
|
|
Bind address. |
|
|
Bind port. |
|
|
SSE push interval. |
|
|
Sliding window for |
Returns: LiveDashboardServer.
stop_dashboard()
Cleanly shuts down the running server (idempotent).
snapshot_metrics()
from je_load_density import snapshot_metrics
payload = snapshot_metrics(window_seconds=10.0)
Returns the dict served by /snapshot:
totals— overall counts (re-used frombuild_summary)latency_overall— overall percentilesper_name— per-endpoint statsrps— rolling RPS overwindow_secondsavg_ms— rolling mean latencyts— Unix time of the snapshot
Endpoints
URL |
Returns |
|---|---|
|
Single-page HTML. |
|
|
|
One-shot JSON. |
Action-JSON commands
LD_start_dashboard/LD_stop_dashboard