From c29ea9a0fa0852a503ceef595b5d593ed28c8322 Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Mon, 11 May 2026 15:22:42 +0200 Subject: [PATCH] feat(reports): add swap usage chart to database report (#45746) --- apps/studio/data/reports/database-charts.ts | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/apps/studio/data/reports/database-charts.ts b/apps/studio/data/reports/database-charts.ts index bfc75190293..94e0527e20c 100644 --- a/apps/studio/data/reports/database-charts.ts +++ b/apps/studio/data/reports/database-charts.ts @@ -74,6 +74,33 @@ export const getReportAttributesV2: ( }, ], }, + { + id: 'swap-usage', + label: 'Swap usage', + docsUrl: `${DOCS_URL}/guides/telemetry/reports#memory-usage`, + hide: false, + showTooltip: true, + showLegend: false, + hideChartType: false, + defaultChartStyle: 'bar', + showMaxValue: false, + showGrid: true, + syncId: 'database-reports', + valuePrecision: 2, + YAxisProps: { + width: 75, + tickFormatter: (value: any) => formatBytes(value, 2), + }, + attributes: [ + { + attribute: 'swap_usage', + provider: 'infra-monitoring', + label: 'Swap', + tooltip: + 'Swap space in use by the operating system. Sustained swap usage indicates memory pressure and may degrade database performance', + }, + ], + }, { id: 'cpu-usage', label: 'CPU usage',