From 4e8ce5bbaf5aa71f7e00e7a131fc6b25e623c992 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 11 Mar 2023 19:38:16 +0100 Subject: abstract away tile rendering logic This is in prepration for the tilehunt mode, where we want to render tiles differently. --- benches/hittebench.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'benches') 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::(19, &data, || Ok(()))); }); } -- cgit v1.2.3