From bd08049d9b40fc1fba7be119b8fd0f371c752922 Mon Sep 17 00:00:00 2001 From: William Law Date: Thu, 16 Jul 2026 10:40:55 -0400 Subject: [PATCH] feat(load-test): add proofs storage slot info --- report/src/components/ConfigCard.tsx | 11 +++++++++++ report/src/pages/LoadTestDetail.tsx | 6 +++++- report/src/types.ts | 9 ++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/report/src/components/ConfigCard.tsx b/report/src/components/ConfigCard.tsx index c3fde4e..2a94c4a 100644 --- a/report/src/components/ConfigCard.tsx +++ b/report/src/components/ConfigCard.tsx @@ -63,6 +63,17 @@ const buildRows = (config: LoadTestConfig): Row[][] => { { label: "Duration", value: config.duration }, { label: "Target gas/s", value: formatTargetGps(config.target_gps) }, ]; + // Surface the storage workload's cold-slot count (from the `storage` tx's + // `slots_per_tx`) so proofs/storage runs show their per-tx write budget. + const storageTx = config.transactions.find( + (t) => t.type === "storage" && t.slots_per_tx != null, + ); + if (storageTx?.slots_per_tx != null) { + target.push({ + label: "Cold storage slots / tx", + value: storageTx.slots_per_tx.toLocaleString(), + }); + } const funding: Row[] = [ { diff --git a/report/src/pages/LoadTestDetail.tsx b/report/src/pages/LoadTestDetail.tsx index d910d7d..73da233 100644 --- a/report/src/pages/LoadTestDetail.tsx +++ b/report/src/pages/LoadTestDetail.tsx @@ -141,6 +141,7 @@ interface LoadTestReportContentProps { to: string; label: string; }; + network?: string; } export const LoadTestReportContent = ({ @@ -148,6 +149,7 @@ export const LoadTestReportContent = ({ title, subtitle, backLink, + network, }: LoadTestReportContentProps) => { const headlineTps = result.throughput.tps; const headlineFlashblocksLatency = result.flashblocks_latency; @@ -161,7 +163,8 @@ export const LoadTestReportContent = ({ [headlineFlashblocksLatency], ); - const headlineLabel = "Swaps/s"; + // Proofs runs are not swap-based, so the hero reads as raw TPS instead of Swaps/s. + const headlineLabel = network === "proofs" ? "TPS" : "Swaps/s"; return ( <> @@ -290,6 +293,7 @@ const LoadTestDetail = () => { to: `/load-tests/${network ?? "sepolia"}/all`, label: "View all runs →", }} + network={network} /> )} diff --git a/report/src/types.ts b/report/src/types.ts index 1d9015f..39e5b7f 100644 --- a/report/src/types.ts +++ b/report/src/types.ts @@ -207,7 +207,14 @@ export interface LoadTestConfig { target_gps: number; seed: number; chain_id: number | null; - transactions: Array<{ type: string; weight: number }>; + // Storage-type entries also carry `contract` and `slots_per_tx` (flattened + // from the Rust `TxTypeConfig::Storage` variant via `#[serde(tag = "type")]`). + transactions: Array<{ + type: string; + weight: number; + contract?: string; + slots_per_tx?: number; + }>; fresh_recipient_ratio?: number; looper_contract: string | null; swap_token_amount: string;