diff --git a/partitioning/fast_clustering_t.cpp b/partitioning/fast_clustering_t.cpp index 3d7d6f524411a15da67b3db98b2ca37583dcaa87..50f4f32da96ca05c7e0892e68f6edcc066ca19ee 100755 --- a/partitioning/fast_clustering_t.cpp +++ b/partitioning/fast_clustering_t.cpp @@ -73,6 +73,8 @@ void process_file_part(const std::string& input_filename, int part_id, int start */ std::cout << "thread " << part_id << " for lines " << start_line << " to " << end_line << std::endl; + auto start = std::chrono::high_resolution_clock::now(); + std::ifstream input_read_file(input_filename); if (!input_read_file.is_open()) { @@ -138,6 +140,10 @@ void process_file_part(const std::string& input_filename, int part_id, int start } input_read_file.close(); + // end the timer and print the elapsed time + auto end = std::chrono::high_resolution_clock::now(); + std::chrono::duration<double> elapsed = end - start; + std::cout << elapsed.count() << "s for thread " << part_id << std::endl; }