@@ -84,9 +84,12 @@ namespace mt_kahypar::dyn {
8484 context.dynamic .local_fm_round = &localFM_round;
8585
8686 context.dynamic .other_timings .setup_time = std::chrono::high_resolution_clock::now () - setup_time_start;
87+ auto finalization_time_start = std::chrono::high_resolution_clock::now ();
8788
8889 try {
8990
91+ auto init_time_start = std::chrono::high_resolution_clock::now ();
92+
9093 std::cout << " Processing " << num_changes << " changes" << std::endl;
9194
9295 auto & hypergraph_p = strategy->init ();
@@ -97,6 +100,9 @@ namespace mt_kahypar::dyn {
97100
98101 auto duration_sum = std::chrono::high_resolution_clock::duration::zero ();
99102 auto change_io_duration_sum = std::chrono::high_resolution_clock::duration::zero ();
103+ auto log_duration_sum = std::chrono::high_resolution_clock::duration::zero ();
104+
105+ context.dynamic .other_timings .initialization_time = std::chrono::high_resolution_clock::now () - init_time_start - context.dynamic .other_timings .initial_partitioning_time ;
100106
101107 for (size_t i = 0 ; i < num_changes; ++i) {
102108 HighResClockTimepoint start_io = std::chrono::high_resolution_clock::now ();
@@ -114,11 +120,16 @@ namespace mt_kahypar::dyn {
114120 if (log_step_size != 0 && i % log_step_size != 0 && i != num_changes - 1 ) {
115121 continue ;
116122 }
123+ HighResClockTimepoint start_log = std::chrono::high_resolution_clock::now ();
117124 log_km1_live (i+1 , num_changes, context, DynamicStrategy::getPartitionedHypergraphCopy (*strategy), duration_sum);
125+ log_duration_sum += std::chrono::high_resolution_clock::now () - start_log;
118126 }
119127
120128 context.dynamic .other_timings .strategy_time = duration_sum;
121129 context.dynamic .other_timings .io_time_change_parsing = change_io_duration_sum;
130+ context.dynamic .other_timings .logging_time = log_duration_sum;
131+
132+ finalization_time_start = std::chrono::high_resolution_clock::now ();
122133
123134 strategy->printAdditionalFinalStats ();
124135
@@ -135,10 +146,12 @@ namespace mt_kahypar::dyn {
135146 exit (1 );
136147 }
137148
138- context.dynamic .other_timings .total_time = std::chrono::high_resolution_clock::now () - total_time_start;
139- if (context.dynamic .save_other_timings ) {
149+ context.dynamic .other_timings .finalization_time = std::chrono::high_resolution_clock::now () - finalization_time_start;
150+ context.dynamic .other_timings .total_time = std::chrono::high_resolution_clock::now () - total_time_start;
151+ if (context.dynamic .save_other_timings ) {
140152 generateOtherTimingsFile (context);
141153 }
154+
142155 return 0 ;
143156 }
144157}
0 commit comments