my fork of dmp
Diffstat (limited to 'benches/diff.rs')
-rw-r--r--benches/diff.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/benches/diff.rs b/benches/diff.rs
deleted file mode 100644
index f426c3c..0000000
--- a/benches/diff.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-use std::path::Path;
-
-use criterion::{criterion_group, criterion_main, Criterion};
-use diff_match_patch_rs::{dmp::DiffMatchPatch, Efficient};
-
-fn diff_main(c: &mut Criterion) {
- let basedir = Path::new("testdata");
- let old = std::fs::read_to_string(basedir.join("txt_old.txt")).unwrap();
- let new = std::fs::read_to_string(basedir.join("txt_new.txt")).unwrap();
-
- let dmp = DiffMatchPatch::default();
-
- c.bench_function("diff-match-patch", |bencher| {
- bencher.iter(|| dmp.diff_main::<Efficient>(&old, &new).unwrap());
- });
-}
-
-criterion_group!(diff, diff_main);
-criterion_main!(diff);