Skip to content

Commit

Permalink
Glean meta from mem managers
Browse files Browse the repository at this point in the history
  • Loading branch information
gsharma committed Jul 30, 2019
1 parent 18d6491 commit b2ec280
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/github/jaemons/DirectMemoryProbe.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;

Expand Down Expand Up @@ -49,6 +50,8 @@ public void run() {
final List<MemoryPoolMXBean> memoryPoolBeans = ManagementFactory.getMemoryPoolMXBeans();
for (final MemoryPoolMXBean memoryPoolBean : memoryPoolBeans) {
if (memoryPoolBean != null && memoryPoolBean.getType() == MemoryType.NON_HEAP) {
// TODO
logger.info(Arrays.deepToString(memoryPoolBean.getMemoryManagerNames()));
final DirectMemorySnapshot directMemorySnapshot = new DirectMemorySnapshot();
directMemorySnapshot.probeTime = System.currentTimeMillis();
directMemorySnapshot.poolName = memoryPoolBean.getName();
Expand Down

0 comments on commit b2ec280

Please sign in to comment.