Skip to content

Commit

Permalink
print size
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Aug 1, 2024
1 parent b5e836e commit fd176b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/soroban-cli/src/commands/snapshot/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,19 @@ impl Cmd {
current.wasm_hashes.len()
);
for (i, bucket) in buckets.iter().enumerate() {
println!("🔎 Looking in bucket {i} {bucket}");
// Defined where the bucket will be read from, either from cache on
// disk, or streamed from the archive.
let cache_path = cache_bucket(&archive_url, i, bucket).await?;
let file = std::fs::OpenOptions::new()
.read(true)
.open(&cache_path)
.map_err(Error::ReadOpeningCachedBucket)?;
print!("🔎 Searching bucket {i} {bucket}");
if let Ok(metadata) = file.metadata() {
print!(" ({})", ByteSize(metadata.len()));
}
println!();

// Stream the bucket entries from the bucket, identifying
// entries that match the filters, and including only the
// entries that match in the snapshot.
Expand Down

0 comments on commit fd176b6

Please sign in to comment.