use criterion::{black_box, criterion_group, criterion_main, Criterion};
use pdfmake_rust::benchmark_fixtures::build_text_10k_document;
use pdfmake_rust::PdfMake;

fn bench_text_10k(c: &mut Criterion) {
    let doc = build_text_10k_document(10_000);
    c.bench_function("text_10k", |b| {
        b.iter(|| PdfMake::new().render(black_box(&doc)).expect("render should succeed"));
    });
}

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