[pbs-devel] [PATCH v6 proxmox-backup 50/65] pxar: create: show chunk injection stats debug output

Christian Ebner c.ebner at proxmox.com
Tue May 14 12:34:06 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 b03bd5a17..6dd0f3106 100644
--- a/pbs-client/src/pxar/create.rs
+++ b/pbs-client/src/pxar/create.rs
@@ -301,6 +301,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