We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5388640 + 468992a commit b1d2d0bCopy full SHA for b1d2d0b
spectator-ext-gc/src/main/java/com/netflix/spectator/gc/GcLogger.java
@@ -162,7 +162,10 @@ private void updateMetrics(String name, GcInfo info) {
162
PROMOTION_RATE.increment(delta);
163
}
164
165
- if (HelperFunctions.getGcType(name) == GcType.OLD) {
+ // Some GCs such as G1 can reduce the old gen size as part of a minor GC. To track the
166
+ // live data size we record the value if we see a reduction in the old gen heap size or
167
+ // after a major GC.
168
+ if (oldAfter < oldBefore || HelperFunctions.getGcType(name) == GcType.OLD) {
169
LIVE_DATA_SIZE.set(oldAfter);
170
final long oldMaxAfter = after.get(oldGenPoolName).getMax();
171
MAX_DATA_SIZE.set(oldMaxAfter);
0 commit comments