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 CACAE1FF170 for ; Thu, 24 Jul 2025 10:59:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4FD0534D92; Thu, 24 Jul 2025 11:01:09 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Thu, 24 Jul 2025 11:00:39 +0200 Message-ID: <20250724090039.443454-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250724090039.443454-1-c.ebner@proxmox.com> References: <20250724090039.443454-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753347661529 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.045 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 Subject: [pbs-devel] [PATCH proxmox-backup 2/2] client: benchmark: fix no-cache flag backwards comaptibility X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" The proxmox-backup-client benchmark command did unconditionally set the no-cache flag to true. This is however not backwards compatible, so expose it as additional cli flag instead, so the user can enable it when benchmarking S3 backend, but default to false. Signed-off-by: Christian Ebner --- proxmox-backup-client/src/benchmark.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/proxmox-backup-client/src/benchmark.rs b/proxmox-backup-client/src/benchmark.rs index 73e4f93fa..ad8c60ed9 100644 --- a/proxmox-backup-client/src/benchmark.rs +++ b/proxmox-backup-client/src/benchmark.rs @@ -113,6 +113,12 @@ static BENCHMARK_RESULT_2020_TOP: BenchmarkResult = BenchmarkResult { schema: KEYFILE_SCHEMA, optional: true, }, + "no-cache": { + type: Boolean, + description: "Bypass local datastore cache for network storages.", + optional: true, + default: false, + }, "output-format": { schema: OUTPUT_FORMAT, optional: true, @@ -123,6 +129,7 @@ static BENCHMARK_RESULT_2020_TOP: BenchmarkResult = BenchmarkResult { /// Run benchmark tests pub async fn benchmark( param: Value, + no_cache: bool, _info: &ApiMethod, _rpcenv: &mut dyn RpcEnvironment, ) -> Result<(), Error> { @@ -145,7 +152,7 @@ pub async fn benchmark( // do repo tests first, because this may prompt for a password if let Some(repo) = repo { - test_upload_speed(&mut benchmark_result, repo, crypt_config.clone()).await?; + test_upload_speed(&mut benchmark_result, repo, crypt_config.clone(), no_cache).await?; } test_crypt_speed(&mut benchmark_result)?; @@ -221,6 +228,7 @@ async fn test_upload_speed( benchmark_result: &mut BenchmarkResult, repo: BackupRepository, crypt_config: Option>, + no_cache: bool, ) -> Result<(), Error> { let backup_time = proxmox_time::epoch_i64(); @@ -237,7 +245,7 @@ async fn test_upload_speed( crypt_config: crypt_config.clone(), debug: false, benchmark: true, - no_cache: true, + no_cache, }, ) .await?; -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel