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

Function PrintFileContainerStats

generator/statistics.cpp:17–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15using namespace feature;
16
17void PrintFileContainerStats(std::ostream & os, std::string const & fPath)
18{
19 os << "File section sizes\n";
20 try
21 {
22 FilesContainerR cont(fPath);
23 cont.ForEachTag([&](FilesContainerR::Tag const & tag)
24 { os << std::setw(18) << tag << " : " << std::setw(10) << cont.GetReader(tag).Size() << "\n"; });
25 }
26 catch (Reader::Exception const & ex)
27 {
28 LOG(LWARNING, ("Error reading file:", fPath, ex.Msg()));
29 }
30 os << "\n";
31}
32
33// 0.001 deg² ≈ 12.392 km² * cos(lat)
34static constexpr double kAreas[] = {10, 20, 50, 100, 200, 500, 1000, 5000, 360 * 360 * 12400};

Callers 1

generator_tool.cppFile · 0.85

Calls 3

ForEachTagMethod · 0.45
SizeMethod · 0.45
GetReaderMethod · 0.45

Tested by

no test coverage detected