From 5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 11 Jun 2026 00:54:30 +0200 Subject: chore: Move everything into one big crate That helps remove duplicated code and rustc/cargo will now also show dead code correctly. --- crates/atuin-history/benches/smart_sort.rs | 35 ------------------------------ 1 file changed, 35 deletions(-) delete mode 100644 crates/atuin-history/benches/smart_sort.rs (limited to 'crates/atuin-history/benches') diff --git a/crates/atuin-history/benches/smart_sort.rs b/crates/atuin-history/benches/smart_sort.rs deleted file mode 100644 index a78064de..00000000 --- a/crates/atuin-history/benches/smart_sort.rs +++ /dev/null @@ -1,35 +0,0 @@ -use atuin_client::history::History; -use atuin_history::sort::sort; - -use rand::Rng; - -fn main() { - // Run registered benchmarks. - divan::main(); -} - -// Smart sort usually runs on 200 entries, test on a few sizes -#[divan::bench(args=[100, 200, 400, 800, 1600, 10000])] -fn smart_sort(lines: usize) { - // benchmark a few different sizes of "history" - // first we need to generate some history. This will use a whole bunch of memory, sorry - let mut rng = rand::thread_rng(); - let now = time::OffsetDateTime::now_utc().unix_timestamp(); - - let possible_commands = ["echo", "ls", "cd", "grep", "atuin", "curl"]; - let mut commands = Vec::::with_capacity(lines); - - for _ in 0..lines { - let command = possible_commands[rng.gen_range(0..possible_commands.len())]; - - let command = History::import() - .command(command) - .timestamp(time::OffsetDateTime::from_unix_timestamp(rng.gen_range(0..now)).unwrap()) - .build() - .into(); - - commands.push(command); - } - - let _ = sort("curl", commands); -} -- cgit v1.3.1