feat(gpodder_sqlite): switch to on-disk sqlite for tests and benches
This commit is contained in:
parent
d329a0e61c
commit
5f57d85584
5 changed files with 51 additions and 12 deletions
|
|
@ -4,7 +4,7 @@ use criterion::{criterion_group, criterion_main, Criterion};
|
|||
use gpodder::{DevicePatch, DeviceRepository};
|
||||
|
||||
pub fn bench_devices_for_user(c: &mut Criterion) {
|
||||
let (store, users) = common::setup();
|
||||
let (path, store, users) = common::setup();
|
||||
|
||||
for i in 0..100000 {
|
||||
store
|
||||
|
|
@ -22,6 +22,8 @@ pub fn bench_devices_for_user(c: &mut Criterion) {
|
|||
c.bench_function("devices for user", |b| {
|
||||
b.iter(|| store.devices_for_user(&users[0]).unwrap())
|
||||
});
|
||||
|
||||
common::teardown(path);
|
||||
}
|
||||
|
||||
criterion_group!(devices, bench_devices_for_user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue