MCPcopy Create free account
hub / github.com/comaps/comaps / RunFeaturesLoadingBenchmark

Function RunFeaturesLoadingBenchmark

libs/map/benchmark_tool/features_loading.cpp:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100} // namespace
101
102void RunFeaturesLoadingBenchmark(string fileName, pair<int, int> scaleRange, AllResult & res)
103{
104 base::GetNameFromFullPath(fileName);
105 base::GetNameWithoutExt(fileName);
106
107 FeaturesFetcher src;
108 auto const r = src.RegisterMap(platform::LocalCountryFile::MakeForTesting(std::move(fileName)));
109 if (r.second != MwmSet::RegResult::Success)
110 return;
111
112 uint8_t const minScale = r.first.GetInfo()->m_minScale;
113 uint8_t const maxScale = r.first.GetInfo()->m_maxScale;
114 if (minScale > scaleRange.first)
115 scaleRange.first = minScale;
116 if (maxScale < scaleRange.second)
117 scaleRange.second = maxScale;
118
119 if (scaleRange.first > scaleRange.second)
120 return;
121
122 RunBenchmark(src, r.first.GetInfo()->m_bordersRect, scaleRange, res);
123}
124} // namespace bench

Callers 1

mainFunction · 0.85

Calls 5

GetNameFromFullPathFunction · 0.85
GetNameWithoutExtFunction · 0.85
RunBenchmarkFunction · 0.85
RegisterMapMethod · 0.45
GetInfoMethod · 0.45

Tested by

no test coverage detected