Download Jar. Libraryless. Click here for Pure Java version (2417L/16K).
!7 import com.sun.management.GcInfo; p { repeat with sleep 1 { List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); long count = 0; long timeMillis = 0; for (GarbageCollectorMXBean gcBean : gcBeans) { print("Collector: " + gcBean.getName()); GcInfo info = ((com.sun.management.GarbageCollectorMXBean) gcBean).getLastGcInfo(); if (info != null) pnlStructIndent(callAllMethodsInInterface(info, GcInfo.class)); print(); } } }
Began life as a copy of #1013392
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013393 |
Snippet name: | Test GarbageCollectorMXBean 2 (show last GC info, OK) |
Eternal ID of this version: | #1013393/7 |
Text MD5: | 5cf4c6d39eec7cb2654583236979a4d8 |
Transpilation MD5: | 632106dab59b783ac53f5ee7658bbd89 |
Author: | stefan |
Category: | javax / gc / monitoring |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-01-05 01:08:52 |
Source code size: | 537 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 464 / 1110 |
Version history: | 6 change(s) |
Referenced in: | #1013395 - Test GarbageCollectorMXBean 3 (GC notifications, OK) |