From 26a954659724b75265f1c7fc2f13c2f47962873d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 12 Sep 2023 22:44:33 +0200 Subject: [PATCH] build: remove bench as it cannot be run The benchmark relies on rust nightly as well as a file outside of the repository, meaning that it's impossible to use. --- crates/vim9-lexer/benches/bench.rs | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 crates/vim9-lexer/benches/bench.rs diff --git a/crates/vim9-lexer/benches/bench.rs b/crates/vim9-lexer/benches/bench.rs deleted file mode 100644 index e9a96b0..0000000 --- a/crates/vim9-lexer/benches/bench.rs +++ /dev/null @@ -1,27 +0,0 @@ -#![feature(test)] - -extern crate test; - -#[bench] -fn lexer_handler(b: &mut test::Bencher) { - b.iter(|| { - let contents = include_str!("/home/tjdevries/git/lsp/src/autoload/lsp/handlers.vim"); - let lexer = vim9_lexer::Lexer::new(contents); - - let mut res = vec![]; - loop { - match test::black_box(lexer.next_token()) { - Ok(tok) => { - if tok.kind == vim9_lexer::TokenKind::EndOfFile { - break; - } - - res.push(tok); - } - Err(err) => panic!("error: {err:?}"), - } - } - - assert!(!res.is_empty(), "Must have some items"); - }); -}