diff --git a/src/marketing/app/performance/page.tsx b/src/marketing/app/performance/page.tsx index 4cc51023..4f9bd2bd 100644 --- a/src/marketing/app/performance/page.tsx +++ b/src/marketing/app/performance/page.tsx @@ -13,6 +13,7 @@ import { fetchPerfRuns, fmtInt, type PerfRun } from './_lib/runs' const STATUS_PAGE_URL = 'https://status.tempo.xyz' const PERF_DASHBOARD_URL = 'https://perf.tempo.xyz/' +const ONE_WEEK_MS = 7 * 24 * 60 * 60 * 1000 const HERO_STAT_LABELS = ['Transactions per second', 'Avg block time', 'Average fee'] const SETTLEMENT_SKELETON_CELLS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] const UPTIME_SKELETON_BARS = Array.from({ length: 90 }, (_, i) => `bar-${i}`) @@ -252,6 +253,13 @@ export default function PerformancePage() { const latest = runs[runs.length - 1] const hasRuns = runs.length >= 2 + const chartRuns = latest + ? runs.filter( + (run) => + new Date(run.startedAt).getTime() >= new Date(latest.startedAt).getTime() - ONE_WEEK_MS, + ) + : [] + const hasChartRuns = chartRuns.length >= 2 const heroStats = latest ? [ @@ -275,7 +283,7 @@ export default function PerformancePage() {
Transactions per second