Skip to content

Commit

Permalink
Add decay time logging
Browse files Browse the repository at this point in the history
  • Loading branch information
henningandersen committed Jan 26, 2024
1 parent a7f6a5d commit e3064f7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,11 @@ public boolean maybeEvictLeastUsed() {
}

private void computeDecay() {
long now = System.currentTimeMillis();
long afterLock;
long end;
synchronized (SharedBlobCacheService.this) {
afterLock = System.currentTimeMillis();
appendLevel1ToLevel0();
for (int i = 2; i < maxFreq; i++) {
assert freqs[i - 1] == null;
Expand All @@ -1558,6 +1562,8 @@ private void computeDecay() {
assert freqs[i - 1] == null || invariant(freqs[i - 1], true);
}
}
end = System.currentTimeMillis();
logger.info("Decay took {} ms (acquire lock: {} ms)", end-now, afterLock-now);
}

class DecayAndNewEpochTask extends AbstractRunnable {
Expand Down

0 comments on commit e3064f7

Please sign in to comment.