@Test public void test1() { final SamplingProfiler samplingProfiler = new SamplingProfiler(); assertEmptyHotspots(samplingProfiler); samplingProfiler.update(); }
public synchronized void update() { final Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces(); try { final Thread currentThread = Thread.currentThread(); for (final Map.Entry<Thread, StackTraceElement[]> entry : stackTraces.entrySet()) { final Thread thread = entry.getKey(); final StackTraceElement[] stackTrace = entry.getValue(); if (stackTrace.length > 0 && thread.getState() == Thread.State.RUNNABLE && thread != currentThread) { for (final StackTraceElement element : stackTrace) { if (!isPackageExcluded(element)) { addSample(element); break; } } } } } finally { limitDataSize(); } }
SamplingProfiler { public synchronized void update() { final Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces(); try { final Thread currentThread = Thread.currentThread(); for (final Map.Entry<Thread, StackTraceElement[]> entry : stackTraces.entrySet()) { final Thread thread = entry.getKey(); final StackTraceElement[] stackTrace = entry.getValue(); if (stackTrace.length > 0 && thread.getState() == Thread.State.RUNNABLE && thread != currentThread) { for (final StackTraceElement element : stackTrace) { if (!isPackageExcluded(element)) { addSample(element); break; } } } } } finally { limitDataSize(); } } }
SamplingProfiler { public synchronized void update() { final Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces(); try { final Thread currentThread = Thread.currentThread(); for (final Map.Entry<Thread, StackTraceElement[]> entry : stackTraces.entrySet()) { final Thread thread = entry.getKey(); final StackTraceElement[] stackTrace = entry.getValue(); if (stackTrace.length > 0 && thread.getState() == Thread.State.RUNNABLE && thread != currentThread) { for (final StackTraceElement element : stackTrace) { if (!isPackageExcluded(element)) { addSample(element); break; } } } } } finally { limitDataSize(); } } SamplingProfiler();  SamplingProfiler(List<String> excludedPackages, List<String> includedPackages);  SamplingProfiler(String excludedPackages, String includedPackages); }
SamplingProfiler { public synchronized void update() { final Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces(); try { final Thread currentThread = Thread.currentThread(); for (final Map.Entry<Thread, StackTraceElement[]> entry : stackTraces.entrySet()) { final Thread thread = entry.getKey(); final StackTraceElement[] stackTrace = entry.getValue(); if (stackTrace.length > 0 && thread.getState() == Thread.State.RUNNABLE && thread != currentThread) { for (final StackTraceElement element : stackTrace) { if (!isPackageExcluded(element)) { addSample(element); break; } } } } } finally { limitDataSize(); } } SamplingProfiler();  SamplingProfiler(List<String> excludedPackages, List<String> includedPackages);  SamplingProfiler(String excludedPackages, String includedPackages); synchronized void update(); synchronized List<SampledMethod> getHotspots(int rows); synchronized void clear(); }
SamplingProfiler { public synchronized void update() { final Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces(); try { final Thread currentThread = Thread.currentThread(); for (final Map.Entry<Thread, StackTraceElement[]> entry : stackTraces.entrySet()) { final Thread thread = entry.getKey(); final StackTraceElement[] stackTrace = entry.getValue(); if (stackTrace.length > 0 && thread.getState() == Thread.State.RUNNABLE && thread != currentThread) { for (final StackTraceElement element : stackTrace) { if (!isPackageExcluded(element)) { addSample(element); break; } } } } } finally { limitDataSize(); } } SamplingProfiler();  SamplingProfiler(List<String> excludedPackages, List<String> includedPackages);  SamplingProfiler(String excludedPackages, String includedPackages); synchronized void update(); synchronized List<SampledMethod> getHotspots(int rows); synchronized void clear();  }