!7 import javax.management.*; import javax.management.openmbean.CompositeData; import com.sun.management.GcInfo; import com.sun.management.GarbageCollectionNotificationInfo; srecord noeq GCPause(long start, long duration) { toString { ret "GCPause duration=" + duration + " ms, start=" + start + " (VM time)"; } } static L pauses = synchroList(); p { onGCNotification(voidfunc(GarbageCollectionNotificationInfo info) { GcInfo gcInfo = info.getGcInfo(); GCPause pause = new(gcInfo.getStartTime(), gcInfo.getDuration()); pauses.add(pause); print("Have GC pause: " + pause); }); }