diff options
author | Yuri Gorshenin <y@maps.me> | 2015-07-01 16:55:50 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:53:33 +0300 |
commit | 54e5990c7e4c65b0749c21ce4fe3866909a29668 (patch) | |
tree | ec9f80550c7402b7d5f577773353c0d7eb6fb0a7 /map/benchmark_tool | |
parent | 025f73ad85d489c4ea143b9d95dde4d308daf89b (diff) |
Revert "Merge pull request #1068 from maps/revert-929-abstract-country-file"
This reverts commit 66aac38c3004d261ee06a16f7e9db372f67614df, reversing
changes made to ad8708944070f6b32a17fbb944d3c493b3fb2a24.
Diffstat (limited to 'map/benchmark_tool')
-rw-r--r-- | map/benchmark_tool/features_loading.cpp | 18 |
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); } |