From 9a100d9199b0fbadec8f5c42b6909927515a423f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 24 Dec 2024 21:19:12 -0600 Subject: [PATCH] perf(dict): Add bench outline --- Cargo.lock | 1 + crates/typos-dict/Cargo.toml | 5 +++++ crates/typos-dict/benches/benches/main.rs | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 crates/typos-dict/benches/benches/main.rs diff --git a/Cargo.lock b/Cargo.lock index c6c958f..964de47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1496,6 +1496,7 @@ dependencies = [ "codegenrs", "csv", "dictgen", + "divan", "edit-distance", "indexmap", "itertools 0.13.0", diff --git a/crates/typos-dict/Cargo.toml b/crates/typos-dict/Cargo.toml index 3fc4d08..9d20a32 100644 --- a/crates/typos-dict/Cargo.toml +++ b/crates/typos-dict/Cargo.toml @@ -28,6 +28,11 @@ dictgen = { version = "^0.2", path = "../dictgen", features = ["codegen"] } varcon = { version = "^1.0", path = "../varcon" } snapbox = "0.6.5" indexmap = "2.2.6" +divan = "0.1.16" [lints] workspace = true + +[[bench]] +name = "benches" +harness = false diff --git a/crates/typos-dict/benches/benches/main.rs b/crates/typos-dict/benches/benches/main.rs new file mode 100644 index 0000000..456578e --- /dev/null +++ b/crates/typos-dict/benches/benches/main.rs @@ -0,0 +1,3 @@ +fn main() { + divan::main(); +}