Skip to content

Commit 70f8559

Browse files
committed
show unique xorb count
1 parent 720205e commit 70f8559

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

data/src/bin/xtool.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,18 @@ impl Command {
189189
let total_uncompressed_size: u64 =
190190
response.terms.iter().map(|term| term.unpacked_length as u64).sum();
191191

192+
// Count unique XORBs
193+
let unique_xorbs: std::collections::HashSet<_> = response.terms.iter()
194+
.map(|term| &term.hash)
195+
.collect();
196+
192197
println!("Compressed Size: {}", format_bytes_with_units(total_compressed_size));
193198
println!("Uncompressed Size: {}", format_bytes_with_units(total_uncompressed_size));
194199
println!(
195200
"Compression Ratio: {:.2}%",
196201
(total_compressed_size as f64 / total_uncompressed_size as f64) * 100.0
197202
);
203+
println!("XORBs: {} unique", unique_xorbs.len());
198204
Ok(())
199205
},
200206
None => {

0 commit comments

Comments
 (0)