Add elapsed time reporting for long-running commands#9513
Add elapsed time reporting for long-running commands#9513Bbn08 wants to merge 5 commits intoThe-OpenROAD-Project:masterfrom
Conversation
a14c1f5 to
bfba497
Compare
There was a problem hiding this comment.
Code Review
The pull request successfully adds elapsed time reporting to several long-running commands using utl::Timer. This provides better visibility into command execution times at the INFO level. However, there is an inconsistency in src/grt/src/GlobalRouter.cpp where the utl/timer.h header is included but not used, and the elapsed time is calculated manually using std::chrono instead of the utl::Timer class used in other files.
7cf7a29 to
c05534a
Compare
Add INFO-level elapsed time logging to 9 long-running OpenROAD commands using utl::Timer: - DPL: Opendp::detailedPlacement (msg 500) - CTS: TritonCTS::runTritonCts (msg 500) - GRT: GlobalRouter::globalRoute (msg 501) - DRT: TritonRoute::main (msg 501) - GPL: Replace::doPlace (msg 500) - MPL: MacroPlacer::place (msg 500) - RSZ: Resizer::repairDesign (msg 500) - PDN: PdnGen::buildGrids (msg 500) - IFP: InitFloorplan::initFloorplan (msg 500) Each function logs 'Elapsed time: X.XXs' at INFO level upon completion, providing users with runtime visibility without requiring verbose mode. Closes The-OpenROAD-Project#5003 Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
c05534a to
d5ad6ed
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
d52da0d to
2536d62
Compare
src/grt/src/GlobalRouter.cpp
Outdated
| logger_->info( | ||
| GRT, 303, "Global routing runtime = {:02}:{:02}:{:02}", hour, min, sec); | ||
| } | ||
| logger_->info(GRT, 501, "Runtime: {:.2f}s", timer.elapsed()); |
There was a problem hiding this comment.
We are already reporting runtime here under -verbose, why add it again?
Note that existing h:m:s is easier to read the just a total number of seconds. It might be nice to do that generally. You could make a method on Timer to return such a string.
There was a problem hiding this comment.
Removed, the existing verbose h:m:s line is sufficient. Will follow up with a Timer::toString() method in a separate cleanup if desired.
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
|
The PDN change seems unrelated and should be its own PR |
src/pdn/src/PdnGen.cc
Outdated
|
|
||
| void PdnGen::buildGrids(bool trim) | ||
| { | ||
| utl::Timer timer; |
There was a problem hiding this comment.
this only captures one "phase" of the build, it seems like what you want is to measure the time from the start of buildGrids through writeDb (which can also make a lot of time)
There was a problem hiding this comment.
Fixed in the separate PDN pr (shall be pushing shortly) added PdnGen::run() that wraps buildGrids + writeToDb under a single timer, so the reported runtime covers both phases.
Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
Signed-off-by: Bbn08 <atrancendentbeing@gmail.com>
Add INFO-level elapsed time logging to 9 long-running OpenROAD commands using utl::Timer:
Each function logs 'Elapsed time: X.XXs' at INFO level upon completion, providing users with runtime visibility without requiring verbose mode.
Closes #5003