[pbs-devel] [PATCH v9 proxmox-backup 34/58] pxar: create: show chunk injection stats info output
Christian Ebner
c.ebner at proxmox.com
Wed Jun 5 12:53:52 CEST 2024
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 8:
- fix subject as the output is logged as info, not debug
- reword partial chunks to partially reused chunks
pbs-client/src/pxar/create.rs | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/pbs-client/src/pxar/create.rs b/pbs-client/src/pxar/create.rs
index 704f58e86..53c8a5307 100644
--- a/pbs-client/src/pxar/create.rs
+++ b/pbs-client/src/pxar/create.rs
@@ -281,6 +281,34 @@ where
encoder.finish().await?;
encoder.close().await?;
+ if metadata_mode {
+ log::info!("Change detection summary:");
+ log::info!(
+ " - {} total files ({} hardlinks)",
+ archiver.reuse_stats.files_reused_count
+ + archiver.reuse_stats.files_reencoded_count
+ + archiver.reuse_stats.files_hardlink_count,
+ archiver.reuse_stats.files_hardlink_count,
+ );
+ log::info!(
+ " - {} unchanged, reusable files with {} data",
+ archiver.reuse_stats.files_reused_count,
+ HumanByte::from(archiver.reuse_stats.total_reused_payload_size),
+ );
+ log::info!(
+ " - {} changed or non-reusable files with {} data",
+ archiver.reuse_stats.files_reencoded_count,
+ HumanByte::from(archiver.reuse_stats.total_reencoded_size),
+ );
+ log::info!(
+ " - {} padding in {} partially reused chunks",
+ HumanByte::from(
+ archiver.reuse_stats.total_injected_size
+ - archiver.reuse_stats.total_reused_payload_size
+ ),
+ archiver.reuse_stats.partial_chunks_count,
+ );
+ }
Ok(())
}
--
2.39.2
More information about the pbs-devel
mailing list