924060929 commented on code in PR #42007: URL: https://github.com/apache/doris/pull/42007#discussion_r1804067063
########## fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java: ########## @@ -536,6 +543,15 @@ private PhysicalPlan chooseBestPlan(Group rootGroup, PhysicalProperties physical } } + private long getGarbageCollectionTime() { + List<GarbageCollectorMXBean> gcMxBeans = ManagementFactory.getGarbageCollectorMXBeans(); + long initialGCTime = 0; + for (GarbageCollectorMXBean gcBean : gcMxBeans) { + initialGCTime += gcBean.getCollectionTime(); + } + return initialGCTime; + } Review Comment: How long does this function usually take? If > 10ms, we should only compute this time when SessionVariable.enable_profile == true -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org