Skip to content

Commit c2f315e

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

data/src/bin/xtool.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,17 @@ 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<_> =
194+
response.terms.iter().map(|term| &term.hash).collect();
195+
192196
println!("Compressed Size: {}", format_bytes_with_units(total_compressed_size));
193197
println!("Uncompressed Size: {}", format_bytes_with_units(total_uncompressed_size));
194198
println!(
195199
"Compression Ratio: {:.2}%",
196200
(total_compressed_size as f64 / total_uncompressed_size as f64) * 100.0
197201
);
202+
println!("XORBs: {} unique", unique_xorbs.len());
198203
Ok(())
199204
},
200205
None => {

0 commit comments

Comments
 (0)