Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import com.microsoft.gctoolkit.event.g1gc.G1GCPauseEvent;
import com.microsoft.gctoolkit.event.generational.GenerationalGCPauseEvent;
import com.microsoft.gctoolkit.event.shenandoah.ShenandoahCycle;
import com.microsoft.gctoolkit.event.zgc.FullZGCCycle;
import com.microsoft.gctoolkit.event.zgc.MajorZGCCycle;
import com.microsoft.gctoolkit.event.zgc.MinorZGCCycle;
import com.microsoft.gctoolkit.event.zgc.ZGCFullCollection;
import com.microsoft.gctoolkit.event.zgc.ZGCYoungCollection;
import com.microsoft.gctoolkit.event.zgc.ZGCOldCollection;

@Aggregates({EventSource.G1GC,EventSource.GENERATIONAL,EventSource.ZGC,EventSource.SHENANDOAH})
public class CollectionCycleCountsAggregator extends Aggregator<CollectionCycleCountsAggregation> {
Expand All @@ -19,21 +19,21 @@ public CollectionCycleCountsAggregator(CollectionCycleCountsAggregation results)
register(GenerationalGCPauseEvent.class, this::count);
register(G1GCPauseEvent.class, this::count);
register(G1GCConcurrentEvent.class, this::count);
register(FullZGCCycle.class,this::count);
register(MajorZGCCycle.class,this::count);
register(MinorZGCCycle.class,this::count);
register(ZGCFullCollection.class, this::count);
register(ZGCOldCollection.class, this::count);
register(ZGCYoungCollection.class, this::count);
register(ShenandoahCycle.class,this::count);
}

private void count(FullZGCCycle event) {
private void count(ZGCFullCollection event) {
aggregation().count(event.getGarbageCollectionType());
}

private void count(MajorZGCCycle event) {
private void count(ZGCOldCollection event) {
aggregation().count(event.getGarbageCollectionType());
}

private void count(MinorZGCCycle event) {
private void count(ZGCYoungCollection event) {
aggregation().count(event.getGarbageCollectionType());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import com.microsoft.gctoolkit.event.g1gc.G1GCPauseEvent;
import com.microsoft.gctoolkit.event.generational.GenerationalGCPauseEvent;
import com.microsoft.gctoolkit.event.shenandoah.ShenandoahCycle;
import com.microsoft.gctoolkit.event.zgc.FullZGCCycle;
import com.microsoft.gctoolkit.event.zgc.MajorZGCCycle;
import com.microsoft.gctoolkit.event.zgc.MinorZGCCycle;
import com.microsoft.gctoolkit.event.zgc.ZGCFullCollection;
import com.microsoft.gctoolkit.event.zgc.ZGCOldCollection;
import com.microsoft.gctoolkit.event.zgc.ZGCYoungCollection;

@Aggregates({EventSource.G1GC,EventSource.GENERATIONAL,EventSource.ZGC,EventSource.SHENANDOAH})
public class HeapOccupancyAfterCollectionAggregator extends Aggregator<HeapOccupancyAfterCollectionAggregation> {
Expand All @@ -17,17 +17,17 @@ public HeapOccupancyAfterCollectionAggregator(HeapOccupancyAfterCollectionAggreg
super(results);
register(GenerationalGCPauseEvent.class, this::extractHeapOccupancy);
register(G1GCPauseEvent.class, this::extractHeapOccupancy);
register(FullZGCCycle.class,this::extractHeapOccupancy);
register(MajorZGCCycle.class,this::extractHeapOccupancy);
register(MinorZGCCycle.class,this::extractHeapOccupancy);
register(ZGCFullCollection.class, this::extractHeapOccupancy);
register(ZGCOldCollection.class, this::extractHeapOccupancy);
register(ZGCYoungCollection.class, this::extractHeapOccupancy);
register(ShenandoahCycle.class,this::extractHeapOccupancy);
}

private void extractHeapOccupancy(MinorZGCCycle event) {
aggregation().addDataPoint(event.getGarbageCollectionType(), event.getDateTimeStamp(), event.getYoungCycle().getMemorySummary().getOccupancyAfter());
private void extractHeapOccupancy(ZGCYoungCollection event) {
aggregation().addDataPoint(event.getGarbageCollectionType(), event.getDateTimeStamp(), event.getMemorySummary().getOccupancyAfter());
}

private void extractHeapOccupancy(MajorZGCCycle event) {
private void extractHeapOccupancy(ZGCOldCollection event) {
aggregation().addDataPoint(event.getGarbageCollectionType(), event.getDateTimeStamp(), event.getMemorySummary().getOccupancyAfter());
}

Expand All @@ -41,7 +41,7 @@ private void extractHeapOccupancy(G1GCPauseEvent event) {
aggregation().addDataPoint(event.getGarbageCollectionType(), event.getDateTimeStamp(), event.getHeap().getOccupancyAfterCollection());
}

private void extractHeapOccupancy(FullZGCCycle event) {
private void extractHeapOccupancy(ZGCFullCollection event) {
aggregation().addDataPoint(event.getGarbageCollectionType(), event.getDateTimeStamp(), event.getMemorySummary().getOccupancyAfter());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ public enum GarbageCollectionTypes implements LabelledGCEventType {
G1Trap("G1GC Trap"),
Unknown("Unknown"),
ZGCFull("ZGC FULL"),
ZGCMajor("ZGC Major"),
ZGCMinor("ZGC Minor"),
ZGCMajorOld("ZGC Major Old"),
ZGCMajorYoung("ZGC Major Young"),
ZGCMinorYoung("ZGC Minor Young"),
Shenandoah("Shenandoah");

private final String label;
Expand Down
Loading