From 87b3898fc5d4e6ee3fed78188ea7da98c16683ab Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 8 Mar 2023 20:04:51 +0100 Subject: perf: add benchmark of Registry::retrieve --- benches/registry.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 benches/registry.rs (limited to 'benches') diff --git a/benches/registry.rs b/benches/registry.rs new file mode 100644 index 0000000..9bfe9c4 --- /dev/null +++ b/benches/registry.rs @@ -0,0 +1,12 @@ +use criterion::{criterion_group, criterion_main, Criterion}; +use opengl_registry::Registry; + +fn bench_registry(crit: &mut Criterion) +{ + crit.bench_function("retrieve registry from included XML file", |bencher| { + bencher.iter(Registry::retrieve) + }); +} + +criterion_group!(benches, bench_registry); +criterion_main!(benches); -- cgit v1.2.3-18-g5258