diff options
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/api/query.benchmark.cpp | 4 | ||||
-rw-r--r-- | benchmark/api/render.benchmark.cpp | 8 | ||||
-rw-r--r-- | benchmark/parse/vector_tile.benchmark.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp index 7694585526..f9cbbff32b 100644 --- a/benchmark/api/query.benchmark.cpp +++ b/benchmark/api/query.benchmark.cpp @@ -22,10 +22,10 @@ public: NetworkStatus::Set(NetworkStatus::Status::Offline); fileSource.setAccessToken("foobar"); - map.getStyle().loadJSON(util::read_file("benchmark/fixtures/api/style.json")); + map.getStyle().loadJSON(util::readFile("benchmark/fixtures/api/style.json")); map.setLatLngZoom({ 40.726989, -73.992857 }, 15); // Manhattan map.getStyle().addImage(std::make_unique<style::Image>("test-icon", - decodeImage(util::read_file("benchmark/fixtures/api/default_marker.png")), 1.0)); + decodeImage(util::readFile("benchmark/fixtures/api/default_marker.png")), 1.0)); frontend.render(map); } diff --git a/benchmark/api/render.benchmark.cpp b/benchmark/api/render.benchmark.cpp index a1b557777f..8c783c6a0e 100644 --- a/benchmark/api/render.benchmark.cpp +++ b/benchmark/api/render.benchmark.cpp @@ -29,11 +29,11 @@ public: ThreadPool threadPool { 4 }; }; -static void prepare(Map& map, optional<std::string> json = {}) { - map.getStyle().loadJSON(json ? *json : util::read_file("benchmark/fixtures/api/style.json")); +static void prepare(Map& map, Blob json = {}) { + map.getStyle().loadJSON(json ? json : util::readFile("benchmark/fixtures/api/style.json")); map.setLatLngZoom({ 40.726989, -73.992857 }, 15); // Manhattan map.getStyle().addImage(std::make_unique<style::Image>("test-icon", - decodeImage(util::read_file("benchmark/fixtures/api/default_marker.png")), 1.0)); + decodeImage(util::readFile("benchmark/fixtures/api/default_marker.png")), 1.0)); } } // end namespace @@ -55,7 +55,7 @@ static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) { Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Static}; while (state.KeepRunning()) { - prepare(map, { "{}" }); + prepare(map, { "{}", false }); frontend.render(map); prepare(map); frontend.render(map); diff --git a/benchmark/parse/vector_tile.benchmark.cpp b/benchmark/parse/vector_tile.benchmark.cpp index 24623dbda7..fab22ae380 100644 --- a/benchmark/parse/vector_tile.benchmark.cpp +++ b/benchmark/parse/vector_tile.benchmark.cpp @@ -6,7 +6,7 @@ using namespace mbgl; static void Parse_VectorTile(benchmark::State& state) { - auto data = std::make_shared<std::string>(util::read_file("test/fixtures/api/assets/streets/10-163-395.vector.pbf")); + auto data = util::readFile("test/fixtures/api/assets/streets/10-163-395.vector.pbf"); while (state.KeepRunning()) { std::size_t length = 0; |