[pbs-devel] [PATCH proxmox-backup 2/2] examples/upload-speed: adapt to change

Dominik Csapak d.csapak at proxmox.com
Fri Jul 17 15:39:17 CEST 2020


commit 323b2f3dd6364119f2ffcd7397161e9f56cdb3fc
changed the signature of upload_speedtest
adapt the example

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 examples/upload-speed.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/upload-speed.rs b/examples/upload-speed.rs
index b438c49..8594d6e 100644
--- a/examples/upload-speed.rs
+++ b/examples/upload-speed.rs
@@ -2,7 +2,7 @@ use anyhow::{Error};
 
 use proxmox_backup::client::*;
 
-async fn upload_speed() -> Result<usize, Error> {
+async fn upload_speed() -> Result<f64, Error> {
 
     let host = "localhost";
     let datastore = "store2";
@@ -20,7 +20,7 @@ async fn upload_speed() -> Result<usize, Error> {
     let client = BackupWriter::start(client, None, datastore, "host", "speedtest", backup_time, false).await?;
 
     println!("start upload speed test");
-    let res = client.upload_speedtest().await?;
+    let res = client.upload_speedtest(true).await?;
 
     Ok(res)
 }
-- 
2.20.1






More information about the pbs-devel mailing list