add chatlist loading benchmark

This commit is contained in:
holger krekel
2022-03-31 15:15:51 +02:00
parent dce7b90fc2
commit d4fed5f5f7
3 changed files with 30 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ fn criterion_benchmark(c: &mut Criterion) {
(0..len).map(|i| chatlist.get_chat_id(i).unwrap()).collect()
});
c.bench_function("Load all chats", |b| {
c.bench_function("chat::get_chat_msgs (load messages from 10 chats)", |b| {
b.to_async(AsyncStdExecutor)
.iter(|| get_chat_msgs_benchmark(black_box(&path.as_ref()), black_box(&chats)))
});