summaryrefslogtreecommitdiff
path: root/benchmark/api/query.benchmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/api/query.benchmark.cpp')
-rw-r--r--benchmark/api/query.benchmark.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp
index ab2adbacee..21f57acbc9 100644
--- a/benchmark/api/query.benchmark.cpp
+++ b/benchmark/api/query.benchmark.cpp
@@ -6,7 +6,7 @@
#include <mbgl/renderer/renderer.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/image.hpp>
-#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/storage/file_source_options.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/io.hpp>
@@ -20,7 +20,6 @@ class QueryBenchmark {
public:
QueryBenchmark() {
NetworkStatus::Set(NetworkStatus::Status::Offline);
- fileSource.setAccessToken("foobar");
map.getStyle().loadJSON(util::read_file("benchmark/fixtures/api/style.json"));
map.jumpTo(CameraOptions().withCenter(LatLng { 40.726989, -73.992857 }).withZoom(15.0)); // Manhattan
@@ -30,11 +29,12 @@ public:
frontend.render(map);
}
+ FileSourceOptions fileSourceOptions = FileSourceOptions().withCachePath("benchmark/fixtures/api/cache.db").withAccessToken("foobar");
+
util::RunLoop loop;
- DefaultFileSource fileSource{ "benchmark/fixtures/api/cache.db", "." };
- HeadlessFrontend frontend { { 1000, 1000 }, 1, fileSource };
+ HeadlessFrontend frontend { { 1000, 1000 }, 1.0, fileSourceOptions };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1,
- fileSource, MapOptions().withMapMode(MapMode::Static) };
+ MapOptions().withMapMode(MapMode::Static), fileSourceOptions };
ScreenBox box{{ 0, 0 }, { 1000, 1000 }};
};