[pbs-devel] [RFC proxmox-backup 3/3] progress: shorter format

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri May 7 10:03:10 CEST 2021


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    separate patch since it changes format more fundamentally, but can be squashed
    with previous patch if applied.

 src/backup/store_progress.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backup/store_progress.rs b/src/backup/store_progress.rs
index e355c9bf..754727fc 100644
--- a/src/backup/store_progress.rs
+++ b/src/backup/store_progress.rs
@@ -42,7 +42,7 @@ impl std::fmt::Display for StoreProgress {
         if self.group_snapshots == 0 {
             write!(
                 f,
-                "{:.2}% ({} of {} groups)",
+                "{:.2}% ({}/{} groups)",
                 self.percentage() * 100.0,
                 self.done_groups,
                 self.total_groups,
@@ -50,7 +50,7 @@ impl std::fmt::Display for StoreProgress {
         } else if self.total_groups == 1 {
             write!(
                 f,
-                "{:.2}% ({} of {} snapshots)",
+                "{:.2}% ({}/{} snapshots)",
                 self.percentage() * 100.0,
                 self.done_snapshots,
                 self.group_snapshots,
@@ -58,7 +58,7 @@ impl std::fmt::Display for StoreProgress {
         } else if self.done_snapshots == self.group_snapshots {
             write!(
                 f,
-                "{:.2}% ({} of {} groups)",
+                "{:.2}% ({}/{} groups)",
                 self.percentage() * 100.0,
                 current_group,
                 self.total_groups,
@@ -66,7 +66,7 @@ impl std::fmt::Display for StoreProgress {
         } else {
             write!(
                 f,
-                "{:.2}% ({} of {} groups, {} of {} group #{}'s snapshots)",
+                "{:.2}% ({}/{} groups, {}/{} snapshots in group #{})",
                 self.percentage() * 100.0,
                 self.done_groups,
                 self.total_groups,
-- 
2.20.1






More information about the pbs-devel mailing list