File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 3535#include " util.hpp"
3636#include " version.hpp"
3737
38+ #include < osmium/util/memory.hpp>
39+
3840#include < exception>
3941#include < memory>
4042
@@ -72,17 +74,26 @@ int main(int argc, char *argv[])
7274
7375 // Processing: In this phase the input file(s) are read and parsed,
7476 // populating some of the tables.
75- process_files (files, osmdata, options.append , get_logger ().show_progress ());
77+ process_files (files, osmdata, options.append ,
78+ get_logger ().show_progress ());
7679
7780 // Process pending ways and relations. Cluster database tables and
7881 // create indexes.
7982 osmdata.stop ();
8083
84+ // Output overall memory usage. This only works on Linux.
85+ osmium::MemoryUsage mem;
86+ if (mem.peak () != 0 ) {
87+ log_debug (" Overall memory usage: peak={}MByte current={}MByte" ,
88+ mem.peak (), mem.current ());
89+ }
90+
8191 log_info (" Osm2pgsql took {} overall." ,
8292 util::human_readable_duration (timer_overall.stop ()));
8393 } catch (std::exception const &e) {
8494 log_error (" {}" , e.what ());
8595 return 1 ;
8696 }
97+
8798 return 0 ;
8899}
You can’t perform that action at this time.
0 commit comments