You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "ethqunzhong (via GitHub)" <gi...@apache.org> on 2024/06/12 11:47:03 UTC
Re: [PR] improve: Enrich GC metrics to better analyze GC behavior and the time consumption of each phase. [bookkeeper]
ethqunzhong commented on code in PR #4384:
URL: https://github.com/apache/bookkeeper/pull/4384#discussion_r1636320811
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -411,14 +415,20 @@ public void runWithFlags(boolean force, boolean suspendMajor, boolean suspendMin
try {
// gc inactive/deleted ledgers
// this is used in extractMetaFromEntryLogs to calculate the usage of entry log
+ long gcLedgersStart = MathUtils.nowInNano();
doGcLedgers();
+ gcStats.getGcLedgerRuntime()
+ .registerSuccessfulEvent(MathUtils.nowInNano() - gcLedgersStart, TimeUnit.NANOSECONDS);
Review Comment:
updated.
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -411,14 +415,20 @@ public void runWithFlags(boolean force, boolean suspendMajor, boolean suspendMin
try {
// gc inactive/deleted ledgers
// this is used in extractMetaFromEntryLogs to calculate the usage of entry log
+ long gcLedgersStart = MathUtils.nowInNano();
doGcLedgers();
Review Comment:
updated.
--
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-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org