From e4996733fce3164c79cd79d0dfaa37a75c5354cc Mon Sep 17 00:00:00 2001 From: yusing Date: Sun, 26 Oct 2025 16:04:28 +0800 Subject: [PATCH] fix(types): add placeholder field in VirtualMemoryStat for swagger --- internal/api/v1/docs/swagger.json | 12 ++++++++++++ internal/api/v1/docs/swagger.yaml | 9 +++++++++ internal/gopsutil | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/internal/api/v1/docs/swagger.json b/internal/api/v1/docs/swagger.json index f0d7dfdc..8c831b60 100644 --- a/internal/api/v1/docs/swagger.json +++ b/internal/api/v1/docs/swagger.json @@ -5166,11 +5166,23 @@ "x-nullable": false, "x-omitempty": false }, + "total": { + "description": "Total amount of RAM on this system", + "type": "number", + "x-nullable": false, + "x-omitempty": false + }, "used": { "description": "RAM used by programs\n\nThis value is computed from the kernel specific values.", "type": "integer", "x-nullable": false, "x-omitempty": false + }, + "used_percent": { + "description": "Percentage of RAM used by programs\n\nThis value is computed from the kernel specific values.", + "type": "number", + "x-nullable": false, + "x-omitempty": false } }, "x-nullable": false, diff --git a/internal/api/v1/docs/swagger.yaml b/internal/api/v1/docs/swagger.yaml index db466ac9..cbacdf22 100644 --- a/internal/api/v1/docs/swagger.yaml +++ b/internal/api/v1/docs/swagger.yaml @@ -1398,12 +1398,21 @@ definitions: This value is computed from the kernel specific values. type: integer + total: + description: Total amount of RAM on this system + type: number used: description: |- RAM used by programs This value is computed from the kernel specific values. type: integer + used_percent: + description: |- + Percentage of RAM used by programs + + This value is computed from the kernel specific values. + type: number type: object net.IOCountersStat: properties: diff --git a/internal/gopsutil b/internal/gopsutil index 74d6b1b4..0500b55d 160000 --- a/internal/gopsutil +++ b/internal/gopsutil @@ -1 +1 @@ -Subproject commit 74d6b1b42f78ba3876b0838cbc500dea1d0e4a9a +Subproject commit 0500b55d1adee20b18d4a1f468fd687a0a8d12c9