sbol 0.1.0

Rust implementation of the SBOL 3.1.0 specification.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Criterion benches for `Document::check` over committed fixtures.
//!
//! Each bench measures only validation; parsing happens once during setup.

use criterion::{Criterion, criterion_group, criterion_main};
use sbol::Document;

const SMALL: &str = include_str!("fixtures/small.ttl");

fn bench_check_small(criterion: &mut Criterion) {
    let document = Document::read_turtle(SMALL).expect("small fixture parses");
    criterion.bench_function("validate/small", |bencher| {
        bencher.iter(|| std::hint::black_box(document.check().is_ok()));
    });
}

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