]> git.proxmox.com Git - proxmox-backup.git/commitdiff
examples/upload-speed: adapt to change
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 17 Jul 2020 13:39:17 +0000 (15:39 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 20 Jul 2020 08:22:42 +0000 (10:22 +0200)
commit 323b2f3dd6364119f2ffcd7397161e9f56cdb3fc
changed the signature of upload_speedtest
adapt the example

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
examples/upload-speed.rs

index b438c4942855f98dd3e9586eb1f9dc673f4643f4..8594d6ead90d030709c5dba700f92c6e3b451180 100644 (file)
@@ -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)
 }