Skip to content

Commit 3672e8b

Browse files
committed
#2258: lb: add timers for lb proper and migration
1 parent 77081f5 commit 3672e8b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc

+14
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,14 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {
204204
commitPhaseStatistics(phase);
205205
}
206206

207+
auto const start_time = timing::getCurrentTime();
207208
applyReassignment(reassignment);
209+
auto const mig_time = timing::getCurrentTime() - start_time;
210+
vt_debug_print(
211+
terse, phase,
212+
"phase={}: mig_time={}\n",
213+
phase, mig_time
214+
);
208215

209216
// Inform the collection manager to rebuild spanning trees if needed
210217
if (reassignment->global_migration_count != 0) {
@@ -258,10 +265,17 @@ LBManager::runLB(PhaseType phase, vt::Callback<ReassignmentMsg> cb) {
258265

259266
vt_debug_print(terse, lb, "LBManager: running strategy\n");
260267

268+
auto const start_time = timing::getCurrentTime();
261269
auto reassignment = strat->startLB(
262270
phase, base_proxy, model_.get(), stats, *comm, total_load_from_model,
263271
*data_map
264272
);
273+
auto const lb_time = timing::getCurrentTime() - start_time;
274+
vt_debug_print(
275+
terse, phase,
276+
"phase={}: lb_time={}\n",
277+
phase, lb_time
278+
);
265279
cb.send(reassignment, phase);
266280
}
267281

0 commit comments

Comments
 (0)