From 61eddd5b74d2d5dc466c69eaf4bd7d0c4e615f15 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 12 Dec 2014 11:54:14 +0900 Subject: [PATCH] Add log messages when dump starts .. to make it easier to find the right dump file for a test when there are multiple dump files. --- .../src/test/java/io/netty/testsuite/util/TestUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testsuite/src/test/java/io/netty/testsuite/util/TestUtils.java b/testsuite/src/test/java/io/netty/testsuite/util/TestUtils.java index 9f63b54cb7..b326417a2a 100644 --- a/testsuite/src/test/java/io/netty/testsuite/util/TestUtils.java +++ b/testsuite/src/test/java/io/netty/testsuite/util/TestUtils.java @@ -219,7 +219,7 @@ public final class TestUtils { } dumpHeap(heapDumpFile); - dumpStack(threadDumpFile); + dumpThreads(threadDumpFile); } private static String timestamp() { @@ -233,6 +233,7 @@ public final class TestUtils { } final String filename = file.toString(); + logger.info("Dumping heap: {}", filename); try { hotspotMXBeanDumpHeap.invoke(hotspotMXBean, filename, true); } catch (Exception e) { @@ -240,10 +241,11 @@ public final class TestUtils { } } - private static void dumpStack(File file) { + private static void dumpThreads(File file) { final String filename = file.toString(); OutputStream out = null; try { + logger.info("Dumping threads: {}", filename); final StringBuilder buf = new StringBuilder(8192); try { for (ThreadInfo info : ManagementFactory.getThreadMXBean().dumpAllThreads(true, true)) {