Now add PhaseTimer to the key phases. Let me add them to Pass 1, Pass 2, Pass 3, admin assembly, S2 computation, dedup, and writing.


Bash

grep -n 'Pass 1:.*scanning\|Pass 2:.*processing nodes\|Pass 3:.*processing ways\|Assembling admin polygons\|Computing S2 cells\|Deduplicating\.\.\.\|Writing index files' builder/src/build_index.cpp | head -10

Find phase locations


2158:            std::cerr << "  Pass 1: scanning relations..." << std::endl;
2183:            std::cerr << "  Pass 2: processing nodes in parallel..." << std::endl;
2306:            std::cerr << "  Pass 3: processing ways and areas with " << num_threads
2722:                    std::cerr << "  Assembling admin polygons in parallel ("
2886:            std::cerr << "Computing S2 cells for ways with " << num_threads << " threads..." << std::endl;
2984:        std::cerr << "Deduplicating..." << std::endl;
3000:    std::cerr << "Writing index files to " << output_dir << "..." << std::endl;


Edit

std::cerr << "  Pass 1: scanning relations..." << std::endl;

            std::cerr << "  Pass 1: scanning relations..." << std::endl;
            PhaseTimer _t1("Pass 1: relation scanning");