Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Advanced label formatting using ["text-section"] expression #13904

Closed
wants to merge 8 commits into from
12 changes: 12 additions & 0 deletions benchmark/api/render.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand All @@ -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);
Loading