[pbs-devel] [PATCH proxmox-backup 2/4] pull: factor out interpolated progress

Dietmar Maurer dietmar at proxmox.com
Tue Dec 1 06:21:43 CET 2020


> -        let percentage = (pos as f64)/(snapshot_count as f64);
> -        let percentage = per_start + percentage*per_group;
> -        worker.log(format!("percentage done: {:.2}%", percentage*100.0));
> +        progress.done_snapshots = pos as u64 + 1;
> +        worker.log(format!("percentage done: {}", progress.clone()));

This clone seems unnecessary.





More information about the pbs-devel mailing list