@Test public void testGetCounterByRequestId() { final Counter counter = createCounter(); final Collector collector = new Collector("test collector3", Collections.singletonList(counter)); counter.addRequest("test request", 0, 0, 0, false, 1000); final CounterRequest request = counter.getRequests().get(0); assertEquals("getCounterByRequestId", counter, collector.getCounterByRequestId(request)); assertNull("getCounterByRequestId", collector.getCounterByRequestId(new CounterRequest("test", "unknown"))); }
public Counter getCounterByRequestId(CounterRequest request) { final String requestId = request.getId(); for (final Counter counter : counters) { if (counter.isRequestIdFromThisCounter(requestId)) { return counter; } } return null; }
Collector { public Counter getCounterByRequestId(CounterRequest request) { final String requestId = request.getId(); for (final Counter counter : counters) { if (counter.isRequestIdFromThisCounter(requestId)) { return counter; } } return null; } }
Collector { public Counter getCounterByRequestId(CounterRequest request) { final String requestId = request.getId(); for (final Counter counter : counters) { if (counter.isRequestIdFromThisCounter(requestId)) { return counter; } } return null; } Collector(String application, List<Counter> counters);  Collector(String application, List<Counter> counters,
			SamplingProfiler samplingProfiler); }
Collector { public Counter getCounterByRequestId(CounterRequest request) { final String requestId = request.getId(); for (final Counter counter : counters) { if (counter.isRequestIdFromThisCounter(requestId)) { return counter; } } return null; } Collector(String application, List<Counter> counters);  Collector(String application, List<Counter> counters,
			SamplingProfiler samplingProfiler); String getApplication(); SamplingProfiler getSamplingProfiler(); List<SampledMethod> getHotspots(); Map<String, Date> getDatesByWebappVersions(); List<Counter> getCounters(); Counter getCounterByName(String counterName); Counter getCounterByRequestId(CounterRequest request); List<CounterRequestContext> getRootCurrentContexts(List<Counter> newParentCounters); long getLastCollectDuration(); Throwable getLastCollectorException(); long getEstimatedMemorySize(); long getDiskUsage(); List<Counter> getRangeCounters(Range range); List<Counter> getRangeCountersToBeDisplayed(Range range); Counter getRangeCounter(Range range, String counterName); void collectLocalContextWithoutErrors(); void collectWithoutErrors(List<JavaInformations> javaInformationsList); JRobin getJRobin(String graphName); Collection<JRobin> getCounterJRobins(); Collection<JRobin> getDisplayedCounterJRobins(); Collection<JRobin> getDisplayedOtherJRobins(); boolean isStorageUsedByMultipleInstances(); void stop(); boolean isStopped(); static void stopJRobin(); static void detachVirtualMachine(); @Override String toString(); }
Collector { public Counter getCounterByRequestId(CounterRequest request) { final String requestId = request.getId(); for (final Counter counter : counters) { if (counter.isRequestIdFromThisCounter(requestId)) { return counter; } } return null; } Collector(String application, List<Counter> counters);  Collector(String application, List<Counter> counters,
			SamplingProfiler samplingProfiler); String getApplication(); SamplingProfiler getSamplingProfiler(); List<SampledMethod> getHotspots(); Map<String, Date> getDatesByWebappVersions(); List<Counter> getCounters(); Counter getCounterByName(String counterName); Counter getCounterByRequestId(CounterRequest request); List<CounterRequestContext> getRootCurrentContexts(List<Counter> newParentCounters); long getLastCollectDuration(); Throwable getLastCollectorException(); long getEstimatedMemorySize(); long getDiskUsage(); List<Counter> getRangeCounters(Range range); List<Counter> getRangeCountersToBeDisplayed(Range range); Counter getRangeCounter(Range range, String counterName); void collectLocalContextWithoutErrors(); void collectWithoutErrors(List<JavaInformations> javaInformationsList); JRobin getJRobin(String graphName); Collection<JRobin> getCounterJRobins(); Collection<JRobin> getDisplayedCounterJRobins(); Collection<JRobin> getDisplayedOtherJRobins(); boolean isStorageUsedByMultipleInstances(); void stop(); boolean isStopped(); static void stopJRobin(); static void detachVirtualMachine(); @Override String toString();  }