diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-04 09:46:19 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-04 10:20:50 +0200 |
commit | b1fcbd5b50eb525623c369cd97a75cfcf7078257 (patch) | |
tree | 82ed2cc2719de83ffdd5237eeb67c150a895a815 /benchmark/api/render.benchmark.cpp | |
parent | 39dcc92f2a1e8ab20bba312f474d34f818be248e (diff) | |
download | qtlocation-mapboxgl-b1fcbd5b50eb525623c369cd97a75cfcf7078257.tar.gz |
[core] Add benchmark for style that uses text-section expression
Diffstat (limited to 'benchmark/api/render.benchmark.cpp')
-rw-r--r-- | benchmark/api/render.benchmark.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/benchmark/api/render.benchmark.cpp b/benchmark/api/render.benchmark.cpp index a1b557777f..80542a1a6c 100644 --- a/benchmark/api/render.benchmark.cpp +++ b/benchmark/api/render.benchmark.cpp @@ -49,6 +49,17 @@ static void API_renderStill_reuse_map(::benchmark::State& state) { } } +static void API_renderStill_reuse_map_formatted_labels(::benchmark::State& state) { + RenderBenchmark bench; + HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool }; + Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Static}; + prepare(map, util::read_file("benchmark/fixtures/api/style_formatted_labels.json")); + + while (state.KeepRunning()) { + frontend.render(map); + } +} + static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) { RenderBenchmark bench; HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool }; @@ -74,5 +85,6 @@ static void API_renderStill_recreate_map(::benchmark::State& state) { } BENCHMARK(API_renderStill_reuse_map); +BENCHMARK(API_renderStill_reuse_map_formatted_labels); BENCHMARK(API_renderStill_reuse_map_switch_styles); BENCHMARK(API_renderStill_recreate_map); |