2021-12-17 10:04:42 +01:00
|
|
|
// Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
|
2023-07-01 10:26:43 +02:00
|
|
|
use anki::card_rendering::anki_directive_benchmark;
|
2023-01-18 12:39:55 +01:00
|
|
|
use criterion::criterion_group;
|
|
|
|
use criterion::criterion_main;
|
|
|
|
use criterion::Criterion;
|
2021-12-17 10:04:42 +01:00
|
|
|
|
|
|
|
pub fn criterion_benchmark(c: &mut Criterion) {
|
2023-07-01 10:26:43 +02:00
|
|
|
c.bench_function("anki_tag_parse", |b| b.iter(|| anki_directive_benchmark()));
|
2021-12-17 10:04:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
criterion_group!(benches, criterion_benchmark);
|
|
|
|
criterion_main!(benches);
|