[pbs-devel] [PATCH v4 proxmox-backup 49/58] pxar: create: show chunk injection stats debug output

Christian Ebner c.ebner at proxmox.com
Mon Apr 29 14:10:53 CEST 2024


Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 pbs-client/src/pxar/create.rs | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/pbs-client/src/pxar/create.rs b/pbs-client/src/pxar/create.rs
index a4c6776fb..0a652f912 100644
--- a/pbs-client/src/pxar/create.rs
+++ b/pbs-client/src/pxar/create.rs
@@ -299,6 +299,27 @@ where
     encoder.finish().await?;
     encoder.close().await?;
 
+    if metadata_mode {
+        log::info!(
+            "Change detection: processed {} files: {} reencoded, {} reused, {} hardlinks",
+            archiver.reuse_stats.files_reused_count
+                + archiver.reuse_stats.files_reencoded_count
+                + archiver.reuse_stats.files_hardlink_count,
+            archiver.reuse_stats.files_reencoded_count,
+            archiver.reuse_stats.files_reused_count,
+            archiver.reuse_stats.files_hardlink_count,
+        );
+        if archiver.reuse_stats.total_reused_payload_size > 0 {
+            log::info!(
+                "Change detection: reused {} data, {} padding: total {} in {} chunks ({} partial chunks)",
+                HumanByte::from(archiver.reuse_stats.total_reused_payload_size),
+                HumanByte::from(archiver.reuse_stats.total_injected_size - archiver.reuse_stats.total_reused_payload_size),
+                HumanByte::from(archiver.reuse_stats.total_injected_size),
+                archiver.reuse_stats.total_injected_count,
+                archiver.reuse_stats.partial_chunks_count,
+            );
+        }
+    }
     Ok(())
 }
 
-- 
2.39.2





More information about the pbs-devel mailing list