Fast and robust atproto CAR file processing in rust

add timing to disk store example

Changed files
+4 -2
examples
disk-read-file
+4 -2
examples/disk-read-file/main.rs
··· 6 6 use clap::Parser; 7 7 use repo_stream::{DiskBuilder, Driver, DriverBuilder}; 8 8 use std::path::PathBuf; 9 + use std::time::Instant; 9 10 10 11 #[derive(Debug, Parser)] 11 12 struct Args { ··· 27 28 let reader = tokio::io::BufReader::new(reader); 28 29 29 30 log::info!("hello! reading the car..."); 31 + let t0 = Instant::now(); 30 32 31 33 // in this example we only bother handling CARs that are too big for memory 32 34 // `noop` helper means: do no block processing, store the raw blocks ··· 48 50 49 51 // at this point you might want to fetch the account's signing key 50 52 // via the DID from the commit, and then verify the signature. 51 - log::warn!("big's comit: {:?}", commit); 53 + log::warn!("big's comit ({:?}): {:?}", t0.elapsed(), commit); 52 54 53 55 // pop the driver back out to get some code indentation relief 54 56 driver ··· 78 80 } 79 81 } 80 82 81 - log::info!("arrived! joining rx..."); 83 + log::info!("arrived! ({:?}) joining rx...", t0.elapsed()); 82 84 83 85 // clean up the database. would be nice to do this in drop so it happens 84 86 // automatically, but some blocking work happens, so that's not allowed in