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:
authorvng <viktor.govako@gmail.com>2011-10-17 17:06:54 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:26:12 +0300
commit57b754ae45cf46763847dd87716356dddfac5325 (patch)
treecfbecda545c691088939ef552dec6f96694b19a2 /map/benchmark_tool
parent55613019590b3dd194cf141bea6ee0f9e7a7c6c1 (diff)
Print mwm scales in benchmark_tool.
Diffstat (limited to 'map/benchmark_tool')
-rw-r--r--map/benchmark_tool/features_loading.cpp7
-rw-r--r--map/benchmark_tool/main.cpp15
2 files changed, 19 insertions, 3 deletions
diff --git a/map/benchmark_tool/features_loading.cpp b/map/benchmark_tool/features_loading.cpp
index dfa1652b50..810fe915d4 100644
--- a/map/benchmark_tool/features_loading.cpp
+++ b/map/benchmark_tool/features_loading.cpp
@@ -99,7 +99,10 @@ namespace
void RunFeaturesLoadingBenchmark(string const & file, size_t count, pair<int, int> scaleR)
{
- pair<int, int> const r = GetMapScaleRange(FilesContainerR(GetPlatform().GetReader(file)));
+ feature::DataHeader header;
+ LoadMapHeader(GetPlatform().GetReader(file), header);
+
+ pair<int, int> const r = header.GetScaleRange();
if (r.first > scaleR.first)
scaleR.first = r.first;
if (r.second < scaleR.second)
@@ -111,7 +114,7 @@ void RunFeaturesLoadingBenchmark(string const & file, size_t count, pair<int, in
model::FeaturesFetcher src;
src.AddMap(file);
- m2::RectD const rect = GetMapBounds(FilesContainerR(GetPlatform().GetReader(file)));
+ m2::RectD const rect = header.GetBounds();
my::Timer timer;
double all = 0.0;
diff --git a/map/benchmark_tool/main.cpp b/map/benchmark_tool/main.cpp
index 32746895e1..bb04669279 100644
--- a/map/benchmark_tool/main.cpp
+++ b/map/benchmark_tool/main.cpp
@@ -1,9 +1,12 @@
#include "api.hpp"
#include "../../indexer/classificator_loader.hpp"
+#include "../../indexer/data_factory.hpp"
#include "../../platform/platform.hpp"
+#include "../../std/iostream.hpp"
+
#include "../../3party/gflags/src/gflags/gflags.h"
@@ -11,7 +14,7 @@ DEFINE_string(input, "", "MWM file name in the data directory");
DEFINE_int32(count, 3, "How many times to run benchmark");
DEFINE_int32(lowS, 10, "Low processing scale");
DEFINE_int32(highS, 17, "High processing scale");
-
+DEFINE_bool(print_scales, false, "Print geometry scales for MWM");
int main(int argc, char ** argv)
{
@@ -30,6 +33,16 @@ int main(int argc, char ** argv)
google::ParseCommandLineFlags(&argc, &argv, false);
+ if (FLAGS_print_scales)
+ {
+ feature::DataHeader h;
+ LoadMapHeader(pl.GetReader(FLAGS_input), h);
+
+ for (size_t i = 0; i < h.GetScalesCount(); ++i)
+ cout << h.GetScale(i) << " ";
+ cout << endl;
+ }
+
if (!FLAGS_input.empty())
{
RunFeaturesLoadingBenchmark(FLAGS_input, FLAGS_count,