summaryrefslogtreecommitdiff
path: root/engine/benches/file_format
diff options
context:
space:
mode:
Diffstat (limited to 'engine/benches/file_format')
-rw-r--r--engine/benches/file_format/wavefront_obj.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/engine/benches/file_format/wavefront_obj.rs b/engine/benches/file_format/wavefront_obj.rs
new file mode 100644
index 0000000..a6b34b2
--- /dev/null
+++ b/engine/benches/file_format/wavefront_obj.rs
@@ -0,0 +1,17 @@
+use std::hint::black_box;
+
+use criterion::{criterion_group, criterion_main, Criterion};
+
+fn bench_parsing(criterion: &mut Criterion)
+{
+ criterion.bench_function("Parsing", |bencher| {
+ bencher.iter_with_large_drop(|| {
+ engine::file_format::wavefront::obj::parse(black_box(include_str!(
+ "../res/teapot.obj"
+ )))
+ })
+ });
+}
+
+criterion_group!(benches, bench_parsing);
+criterion_main!(benches);