mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-03 08:24:19 +01:00
fix: force sqlite to parse schema on connection benchmark
This commit is contained in:
@@ -37,14 +37,16 @@ fn bench_open(criterion: &mut Criterion) {
|
||||
let io = Arc::new(PlatformIO::new().unwrap());
|
||||
let db =
|
||||
Database::open_file(io.clone(), "../testing/schema_5k.db", false, false).unwrap();
|
||||
black_box(db.connect().unwrap());
|
||||
let conn = db.connect().unwrap();
|
||||
conn.execute("SELECT * FROM table_0").unwrap();
|
||||
});
|
||||
});
|
||||
|
||||
if enable_rusqlite {
|
||||
group.bench_function(BenchmarkId::new("sqlite_schema", ""), |b| {
|
||||
b.iter(|| {
|
||||
black_box(rusqlite::Connection::open("../testing/schema_5k.db").unwrap());
|
||||
let conn = rusqlite::Connection::open("../testing/schema_5k.db").unwrap();
|
||||
conn.execute("SELECT * FROM table_0", ()).unwrap();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user