use of org.apache.camel.util.StopWatch in project camel by apache.
the class CbrEsbPerformanceIntegrationTest method testCbr.
@Test
public void testCbr() throws Exception {
// warm up with 1.000 messages so that the JIT compiler kicks in
send("http://127.0.0.1:8192/service/CBRProxy", 1000);
StopWatch watch = new StopWatch();
send("http://127.0.0.1:8192/service/CBRProxy", count);
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
use of org.apache.camel.util.StopWatch in project camel by apache.
the class ContentBasedRoutingPerformanceTest method testFilterSimple.
@Test
public void testFilterSimple() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter-simple");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
assertMockEndpointsSatisfied();
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
use of org.apache.camel.util.StopWatch in project camel by apache.
the class HeaderBasedRoutingPerformanceTest method testFilterSimple.
@Test
public void testFilterSimple() throws InterruptedException {
template.setDefaultEndpointUri("direct:filter-simple");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
assertMockEndpointsSatisfied();
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
use of org.apache.camel.util.StopWatch in project camel by apache.
the class HeaderBasedRoutingPerformanceTest method testChoiceExpression.
@Test
public void testChoiceExpression() throws InterruptedException {
template.setDefaultEndpointUri("direct:choice-expression");
// warm up with 20.000 messages so that the JIT compiler kicks in
execute(20000);
resetMock(count);
StopWatch watch = new StopWatch();
execute(count);
assertMockEndpointsSatisfied();
log.warn("Ran {} tests in {}ms", count, watch.taken());
}
use of org.apache.camel.util.StopWatch in project camel by apache.
the class HttpProxyRouteTest method testHttpProxy.
@Test
public void testHttpProxy() throws Exception {
log.info("Sending " + size + " messages to a http endpoint which is proxied/bridged");
StopWatch watch = new StopWatch();
for (int i = 0; i < size; i++) {
String out = template.requestBody("http://localhost:{{port}}?foo=" + i, null, String.class);
assertEquals("Bye " + i, out);
}
log.info("Time taken: " + TimeUtils.printDuration(watch.taken()));
}
Aggregations