1 | static S renderMemoryPoolSizes2() { |
2 | new L<S> lines; |
3 | long totalCommitted = 0; |
4 | for (MemoryPoolMXBean b : ManagementFactory.getMemoryPoolMXBeans()) { |
5 | long committed = b.getUsage().getCommitted(); |
6 | lines.add(padLeft(str(toM(committed)), 4) + " MB committed: " + b.getName()); |
7 | totalCommitted += committed; |
8 | } |
9 | lines.add(""); |
10 | lines.add("Total committed memory: " + toM(totalCommitted) + " MB"); |
11 | ret lines(lines); |
12 | } |
Began life as a copy of #1013580
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016400 |
Snippet name: | renderMemoryPoolSizes2 (shorter output) |
Eternal ID of this version: | #1016400/4 |
Text MD5: | df56ba1ea254b41ceac3754cc507393d |
Author: | stefan |
Category: | javax / monitoring |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-17 00:28:46 |
Source code size: | 443 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 405 / 450 |
Version history: | 3 change(s) |
Referenced in: | [show references] |