anki/rslib/benches/benchmark.rs
Damien Elmes ded805b504
Switch Rust import style (#2330)
* Prepare to switch Rust import style

* Run nightly format

Closes #2320

* Clean up a few imports

* Enable comment wrapping

* Wrap comments
2023-01-18 21:39:55 +10:00

15 lines
468 B
Rust

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use anki::card_rendering::anki_tag_benchmark;
use criterion::criterion_group;
use criterion::criterion_main;
use criterion::Criterion;
pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("anki_tag_parse", |b| b.iter(|| anki_tag_benchmark()));
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);