mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-26 03:14:23 +01:00
Merge 'remove turso_sqlite3_parser from turso_parser' from Lâm Hoàng Phúc
Closes #2888
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -4347,7 +4347,6 @@ dependencies = [
|
||||
"strum",
|
||||
"strum_macros",
|
||||
"thiserror 1.0.69",
|
||||
"turso_sqlite3_parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -25,7 +25,6 @@ thiserror = "1.0.61"
|
||||
[dev-dependencies]
|
||||
fallible-iterator = "0.3"
|
||||
criterion = { version = "0.5", features = ["html_reports" ] }
|
||||
turso_sqlite3_parser = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_family = "windows"))'.dev-dependencies]
|
||||
pprof = { version = "0.14.0", features = ["criterion", "flamegraph"] }
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||
use fallible_iterator::FallibleIterator;
|
||||
use pprof::criterion::{Output, PProfProfiler};
|
||||
use turso_parser::{lexer::Lexer, parser::Parser};
|
||||
use turso_sqlite3_parser::lexer::{
|
||||
sql::{Parser as OldParser, Tokenizer},
|
||||
Scanner,
|
||||
};
|
||||
|
||||
fn bench_parser(criterion: &mut Criterion) {
|
||||
let queries = [
|
||||
@@ -22,12 +17,6 @@ fn bench_parser(criterion: &mut Criterion) {
|
||||
b.iter(|| Parser::new(black_box(qb)).next().unwrap());
|
||||
});
|
||||
|
||||
group.bench_function(BenchmarkId::new("limbo_old_parser_query", ""), |b| {
|
||||
b.iter(|| {
|
||||
OldParser::new(black_box(qb)).next().unwrap().unwrap();
|
||||
});
|
||||
});
|
||||
|
||||
group.finish();
|
||||
}
|
||||
}
|
||||
@@ -49,12 +38,6 @@ fn bench_parser_insert_batch(criterion: &mut Criterion) {
|
||||
b.iter(|| Parser::new(black_box(qb)).next().unwrap());
|
||||
});
|
||||
|
||||
group.bench_function(BenchmarkId::new("limbo_old_parser_insert_batch", ""), |b| {
|
||||
b.iter(|| {
|
||||
OldParser::new(black_box(qb)).next().unwrap().unwrap();
|
||||
});
|
||||
});
|
||||
|
||||
group.finish();
|
||||
}
|
||||
}
|
||||
@@ -78,18 +61,6 @@ fn bench_lexer(criterion: &mut Criterion) {
|
||||
});
|
||||
});
|
||||
|
||||
group.bench_function(BenchmarkId::new("limbo_old_lexer_query", ""), |b| {
|
||||
b.iter(|| {
|
||||
let tokenizer = Tokenizer::new();
|
||||
let mut scanner = Scanner::new(black_box(tokenizer));
|
||||
loop {
|
||||
if let (_, None, _) = scanner.scan(black_box(qb)).unwrap() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
group.finish();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user