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

fn bench_table_1000(c: &mut Criterion) {
    let doc = build_table_1000_document(1_000);
    c.bench_function("table_1000", |b| {
        b.iter(|| PdfMake::new().render(black_box(&doc)).expect("render should succeed"));
    });
}

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