MemoryUsageSampler { private MemoryUsageSampler() { } private  MemoryUsageSampler(); static synchronized void start(final long sampleTimeMilis); static synchronized void start(final int sampleTimeMilis); @JmxExport static synchronized void start(@JmxExport("sampleTimeMillis") final int sampleTimeMilis,
          @JmxExport("accumulateIntervalMillis") final int accumulateIntervalMillis); @JmxExport static synchronized void stop(); @JmxExport static synchronized boolean isStarted(); static void dumpHeap(final String filename, final boolean liveObjectOnly); static HotSpotDiagnosticMXBean getHotspotDiagnosticBean();  }
@Test public void testMemoryUsageSampler() throws InterruptedException, IOException { System.setProperty("perf.memory.sampleAggMillis", "1000"); assertSamplerBehavior(); assertSamplerBehavior(); }