We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I run this program with n_lanes=16 and datalen=10000 and it crashed. I am benchmarking sled in my project.
use clap::Parser; use std::time::Duration; #[derive(Parser)] struct Opts { n_lanes: usize, datalen: usize, #[clap(long, default_value = "5")] du: u16, } fn main() { let opts = Opts::parse(); let (collector, q) = stats::Collector::new(); std::fs::remove_dir_all("db").ok(); std::fs::create_dir("db").unwrap(); let db: sled::Db = sled::Config::new() .path("db") .flush_every_ms(Some(100)) .open() .unwrap(); for lane_id in 0..opts.n_lanes { let tree = db.open_tree(format!("id={lane_id}")).unwrap(); let mut reporter = stats::Reporter::new(q.clone()); std::thread::spawn(move || { for i in 0.. { let k = i.to_string(); let v = stats::randbytes(opts.datalen); reporter.start(); tree.insert(&k, v).unwrap(); reporter.stop(opts.datalen); } }); } let du = Duration::from_secs(opts.du as u64); std::thread::sleep(du); eprintln!("{}", collector.show(du)); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I run this program with n_lanes=16 and datalen=10000 and it crashed. I am benchmarking sled in my project.
The text was updated successfully, but these errors were encountered: