From 8189160df186affb9d16ed0aabfc316b0ee040df Mon Sep 17 00:00:00 2001 From: Nicole Lemaster Slattengren Date: Mon, 25 Mar 2024 10:41:18 -0700 Subject: [PATCH] #2258: lb: add timers for lb proper and migration --- .../vrt/collection/balance/lb_invoke/lb_manager.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc index ad8c6a0057..bb43c69666 100644 --- a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc +++ b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc @@ -204,7 +204,14 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) { commitPhaseStatistics(phase); } + auto const start_time = timing::getCurrentTime(); applyReassignment(reassignment); + auto const mig_time = timing::getCurrentTime() - start_time; + vt_debug_print( + terse, phase, + "phase={}: mig_time={}\n", + phase, mig_time + ); // Inform the collection manager to rebuild spanning trees if needed if (reassignment->global_migration_count != 0) { @@ -258,10 +265,17 @@ LBManager::runLB(PhaseType phase, vt::Callback cb) { vt_debug_print(terse, lb, "LBManager: running strategy\n"); + auto const start_time = timing::getCurrentTime(); auto reassignment = strat->startLB( phase, base_proxy, model_.get(), stats, *comm, total_load_from_model, *data_map ); + auto const lb_time = timing::getCurrentTime() - start_time; + vt_debug_print( + terse, phase, + "phase={}: lb_time={}\n", + phase, lb_time + ); cb.send(reassignment, phase); }