Download Jar. Libraryless. Click here for Pure Java version (2417L/16K).
1 | !7 |
2 | |
3 | import com.sun.management.GcInfo; |
4 | |
5 | p { |
6 | repeat with sleep 1 { |
7 | List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); |
8 | |
9 | long count = 0; |
10 | long timeMillis = 0; |
11 | for (GarbageCollectorMXBean gcBean : gcBeans) { |
12 | print("Collector: " + gcBean.getName()); |
13 | GcInfo info = ((com.sun.management.GarbageCollectorMXBean) gcBean).getLastGcInfo(); |
14 | if (info != null) |
15 | pnlStructIndent(callAllMethodsInInterface(info, GcInfo.class)); |
16 | print(); |
17 | } |
18 | } |
19 | } |
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: | 465 / 1113 |
Version history: | 6 change(s) |
Referenced in: | [show references] |