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