examples/upload-speed: adapt to change

commit 323b2f3dd6
changed the signature of upload_speedtest
adapt the example

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-07-17 15:39:17 +02:00 committed by Fabian Grünbichler
parent 449e4a66fe
commit eb13d9151a

View 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)
}