markkit 0.1.1

Extract clean markdown from any format – HTML, PDF, DOCX, and more
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use criterion::{Criterion, criterion_group, criterion_main};

fn bench_format_detection(c: &mut Criterion) {
    c.bench_function("format_from_content_type", |b| {
        b.iter(|| {
            markkit::format::Format::from_content_type("text/html; charset=utf-8");
        });
    });

    c.bench_function("format_from_extension", |b| {
        b.iter(|| {
            markkit::format::Format::from_extension("html");
        });
    });
}

criterion_group!(benches, bench_format_detection);
criterion_main!(benches);