@Test public void should_dump_heap() { Path targetDirectory = Paths.get("target"); String targetPath = targetDirectory.toFile().getAbsolutePath(); String heapDumpPath = targetPath + File.separator + "heap-dump-test.hprof"; File heapDumpFile = new File(heapDumpPath); if(heapDumpFile.exists()) { heapDumpFile.delete(); } HeapDumper.dumpHeap(heapDumpPath); assertThat(heapDumpFile).exists(); }
public static void dumpHeap(String fileName) { dumpHeap(false, fileName); }
HeapDumper { public static void dumpHeap(String fileName) { dumpHeap(false, fileName); } }
HeapDumper { public static void dumpHeap(String fileName) { dumpHeap(false, fileName); } private  HeapDumper(); }
HeapDumper { public static void dumpHeap(String fileName) { dumpHeap(false, fileName); } private  HeapDumper(); static void dumpHeap(String fileName); static void dumpHeapWithOnlyLiveObjects(String fileName); }
HeapDumper { public static void dumpHeap(String fileName) { dumpHeap(false, fileName); } private  HeapDumper(); static void dumpHeap(String fileName); static void dumpHeapWithOnlyLiveObjects(String fileName);  }