Make desired input and output for 'map_benchmark'.

This commit is contained in:
vng 2011-08-26 14:01:54 +03:00 committed by Alex Zolotarev
parent 0bbaa037ed
commit 51e8dbb183
3 changed files with 13 additions and 6 deletions

View file

@ -11,6 +11,8 @@
#include "../../base/timer.hpp"
#include "../../base/logging.hpp"
#include "../../std/iostream.hpp"
#include "../../base/start_mem_debug.hpp"
@ -101,7 +103,6 @@ void RunFeaturesLoadingBenchmark(string const & file)
all += timer.ElapsedSeconds();
}
LOG(LINFO, ("Benchmark time for ", file, " = ", all / count));
LOG(LINFO, ("Index time = ", (all - reading) / count));
LOG(LINFO, ("Reading time = ", reading / count));
// 'all time', 'index time', 'feature loading time'
cout << all / count << ' ' << (all - reading) / count << ' ' << reading / count << endl;
}

View file

@ -2,9 +2,15 @@
#include "api.hpp"
#include "../../3party/gflags/src/gflags/gflags.h"
int main()
DEFINE_string(input, "", "Data file name.");
int main(int argc, char ** argv)
{
RunFeaturesLoadingBenchmark("Belarus.mwm");
google::ParseCommandLineFlags(&argc, &argv, true);
RunFeaturesLoadingBenchmark(FLAGS_input);
return 0;
}

View file

@ -6,7 +6,7 @@ CONFIG -= app_bundle
TEMPLATE = app
ROOT_DIR = ../..
DEPENDENCIES = map yg indexer platform geometry coding base expat freetype fribidi
DEPENDENCIES = map yg indexer platform geometry coding base gflags expat freetype fribidi
include($$ROOT_DIR/common.pri)