From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] client: benchmark: fix no-cache flag backwards comaptibility
Date: Thu, 24 Jul 2025 11:00:39 +0200 [thread overview]
Message-ID: <20250724090039.443454-2-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250724090039.443454-1-c.ebner@proxmox.com>
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 <c.ebner@proxmox.com>
---
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<Arc<CryptConfig>>,
+ 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
next prev parent reply other threads:[~2025-07-24 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 9:00 [pbs-devel] [PATCH proxmox-backup 1/2] client: benchmark: fix indentation issues in api schema Christian Ebner
2025-07-24 9:00 ` Christian Ebner [this message]
2025-07-24 9:02 ` [pbs-devel] [PATCH proxmox-backup 2/2] client: benchmark: fix no-cache flag backwards comaptibility Christian Ebner
2025-07-24 12:00 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] client: benchmark: fix indentation issues in api schema Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250724090039.443454-2-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox