@TearDown public void tearDown() { stage.stop().join(); if (profile) { scheduledFuture.cancel(false); scheduledExecutorService.shutdownNow(); final long collectionCount = actorProfiler.getCollectionCount(); final Map<Object, ProfilerData> profilerSnapshot = actorProfiler.getProfilerSnapshot(); System.out.printf("collectionCount " + collectionCount); for (Map.Entry<Object, ProfilerData> e : profilerSnapshot.entrySet()) { System.out.println("%%%%%%%%%%%%%%%%%%%%"); System.out.println(e.getKey()); System.out.println("%%%%%%%%%%%%%%%%%%%%"); System.out.println(ProfileDump.textMethodInfo(e.getValue(), collectionCount)); System.out.println("%%%%%%%%%%%%%%%%%%%%"); System.out.println(e.getKey()); System.out.println("%%%%%%%%%%%%%%%%%%%%"); System.out.println(ProfileDump.textDumpCallTree(e.getValue().getCallTree(), collectionCount)); System.out.println(); } } }