ramesh0201 commented on code in PR #4755: URL: https://github.com/apache/hive/pull/4755#discussion_r1442984613
########## common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java: ########## @@ -92,6 +94,8 @@ public class PerfLogger { protected final Map<String, Long> startTimes = new ConcurrentHashMap<>(); protected final Map<String, Long> endTimes = new ConcurrentHashMap<>(); + protected final Map<String, Long> durations = new ConcurrentHashMap<>(); Review Comment: There are certain cases that the same function gets called multiple times right now and hence get logged multiple times in the PerfLog. Like one example is below: ` 31 2024-01-04T20:33:34,440 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: </PERFLOG method=getDatabase start=1704429214408 end=1704429214440 duration=32 from=Hive HS2-cache> 32 2024-01-04T20:33:34,441 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: <PERFLOG method=getDatabase from=Hive HS2-cache> 33 2024-01-04T20:33:34,441 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: </PERFLOG method=getDatabase start=1704429214441 end=1704429214441 duration=32 from=Hive HS2-cache> 34 2024-01-04T20:33:34,454 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: <PERFLOG method=getDatabase from=Hive HS2-cache> 35 2024-01-04T20:33:34,454 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: </PERFLOG method=getDatabase start=1704429214454 end=1704429214454 duration=32 from=Hive HS2-cache> 36 2024-01-04T20:33:34,721 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: <PERFLOG method=getDatabase from=Hive HS2-cache> 37 2024-01-04T20:33:34,721 DEBUG [8361bd1b-304f-4e07-b34c-2070d7da516a main] log.PerfLogger: </PERFLOG method=getDatabase start=1704429214721 end=1704429214721 duration=32 from=Hive HS2-cache>` If we are just writing the values to log on the go, then I guess the current data structure is fine, but since I am trying to consolidate all the compile time log entries at the end of compilation, it is losing the old information and only the last entry is added -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org