From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 8EE9A1FF136 for ; Mon, 09 Feb 2026 10:15:41 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 85505631; Mon, 9 Feb 2026 10:16:17 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH v1 6/6] pbs-api-types: define api type for s3 request statistics Date: Mon, 9 Feb 2026 10:15:22 +0100 Message-ID: <20260209091533.156902-7-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260209091533.156902-1-c.ebner@proxmox.com> References: <20260209091533.156902-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770628461000 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JAC7U55EHXSCWTQCER5AJF6TVYZ5VYQE X-Message-ID-Hash: JAC7U55EHXSCWTQCER5AJF6TVYZ5VYQE X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Will be used as part of the status response for PBS datastores in order to show the S3 request statistics in the UI. Signed-off-by: Christian Ebner --- pbs-api-types/src/datastore.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs index b4e7ccf5..a2ff4a1d 100644 --- a/pbs-api-types/src/datastore.rs +++ b/pbs-api-types/src/datastore.rs @@ -1677,6 +1677,10 @@ pub struct GarbageCollectionJobStatus { type: Counts, optional: true, }, + "s3-statistics": { + type: S3Statistics, + optional: true, + }, }, )] #[derive(Serialize, Deserialize)] @@ -1695,6 +1699,30 @@ pub struct DataStoreStatus { /// Group/Snapshot counts #[serde(skip_serializing_if = "Option::is_none")] pub counts: Option, + /// S3 backend statistics (on datastores with s3 backend only). + #[serde(skip_serializing_if = "Option::is_none")] + pub s3_statistics: Option, +} + +#[api()] +#[derive(Serialize, Deserialize, Clone, PartialEq)] +#[serde(rename_all = "kebab-case")] +/// Statistics specific to the S3 backend +pub struct S3Statistics { + /// Total downloaded (bytes). + pub downloaded: u64, + /// Total uploaded (bytes). + pub uploaded: u64, + /// Get requests + pub get: u64, + /// Post requests + pub post: u64, + /// Put requests + pub put: u64, + /// Head requests + pub head: u64, + /// Delete requests + pub delete: u64, } #[api( -- 2.47.3