aboutsummaryrefslogtreecommitdiff
path: root/benches
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-03-11 19:38:16 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-03-11 19:38:16 +0100
commit4e8ce5bbaf5aa71f7e00e7a131fc6b25e623c992 (patch)
tree5fc46f69c5ddc78d974f3b93e83af0eacf1b59d1 /benches
parent718d4fbf8b6e85ab808b11143b0657e75096ef73 (diff)
downloadhittekaart-4e8ce5bbaf5aa71f7e00e7a131fc6b25e623c992.tar.gz
hittekaart-4e8ce5bbaf5aa71f7e00e7a131fc6b25e623c992.tar.bz2
hittekaart-4e8ce5bbaf5aa71f7e00e7a131fc6b25e623c992.zip
abstract away tile rendering logic
This is in prepration for the tilehunt mode, where we want to render tiles differently.
Diffstat (limited to 'benches')
-rw-r--r--benches/hittebench.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/benches/hittebench.rs b/benches/hittebench.rs
index 15ca3ff..163fd1e 100644
--- a/benches/hittebench.rs
+++ b/benches/hittebench.rs
@@ -1,6 +1,9 @@
use criterion::{criterion_group, criterion_main, Criterion};
-use hittekaart::{gpx, renderer};
+use hittekaart::{
+ gpx,
+ renderer::{self, heatmap},
+};
static BENCH_DATA: &str = include_str!("bench.gpx");
@@ -12,7 +15,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let data = vec![gpx::extract_from_str(BENCH_DATA).unwrap()];
c.bench_function("render_heatcounter", |b| {
- b.iter(|| renderer::render_heatcounter(19, &data, |_| ()));
+ b.iter(|| renderer::prepare::<heatmap::Renderer, _>(19, &data, || Ok(())));
});
}