Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1016400 // renderMemoryPoolSizes2 (shorter output)

JavaX fragment (include)

static S renderMemoryPoolSizes2() {
  new L<S> lines;
  long totalCommitted = 0;
  for (MemoryPoolMXBean b : ManagementFactory.getMemoryPoolMXBeans()) {
    long committed = b.getUsage().getCommitted();
    lines.add(padLeft(str(toM(committed)), 4) + " MB committed: " +  b.getName());
    totalCommitted += committed;
  }
  lines.add("");
  lines.add("Total committed memory: " + toM(totalCommitted) + " MB");
  ret lines(lines);
}

Author comment

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: 404 / 448
Version history: 3 change(s)
Referenced in: [show references]