Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2015-06-16 18:15:09 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:53:25 +0300
commit598e71858b63ef4e587efd932db41474f8f516a0 (patch)
tree19e39c1dd331579432c9b58e5e1e82c750842ac3 /map/benchmark_tool
parent9148053b3aa67aac443ade98e2ed2ae899419095 (diff)
Storage redesign.
Diffstat (limited to 'map/benchmark_tool')
-rw-r--r--map/benchmark_tool/features_loading.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/map/benchmark_tool/features_loading.cpp b/map/benchmark_tool/features_loading.cpp
index c9fd84ab7d..a316188916 100644
--- a/map/benchmark_tool/features_loading.cpp
+++ b/map/benchmark_tool/features_loading.cpp
@@ -9,6 +9,8 @@
#include "platform/platform.hpp"
+#include "coding/file_name_utils.hpp"
+
#include "base/macros.hpp"
#include "base/timer.hpp"
@@ -97,8 +99,20 @@ namespace
void RunFeaturesLoadingBenchmark(string const & file, pair<int, int> scaleR, AllResult & res)
{
+ string baseName = file;
+ my::GetNameFromFullPath(baseName);
+
+ // Check that file is relative to maps dir.
+ ASSERT_EQUAL(file, baseName, ());
+
+ string countryFileName = baseName;
+ my::GetNameWithoutExt(countryFileName);
+
+ platform::LocalCountryFile localFile =
+ platform::LocalCountryFile::MakeForTesting(countryFileName);
+
feature::DataHeader header;
- LoadMapHeader(GetPlatform().GetReader(file), header);
+ LoadMapHeader(GetPlatform().GetCountryReader(localFile, TMapOptions::EMap), header);
pair<int, int> const r = header.GetScaleRange();
if (r.first > scaleR.first)
@@ -110,7 +124,7 @@ void RunFeaturesLoadingBenchmark(string const & file, pair<int, int> scaleR, All
return;
model::FeaturesFetcher src;
- UNUSED_VALUE(src.RegisterMap(file));
+ UNUSED_VALUE(src.RegisterMap(platform::LocalCountryFile::MakeForTesting(countryFileName)));
RunBenchmark(src, header.GetBounds(), scaleR, res);
}