919293949596979899
public String get() { final TimerContext timer = getTimer.time(); try { return "text"; } finally { timer.stop(); } } }
247248249250251252253254255256257
} } return Response.ok().entity(entity).build(); } finally { timer.stop(); } } }); builder.addMethod("POST").consumes(config.getType()).produces(config.getType()).handledBy(new Inflector<ContainerRequestContext, Object>() {
260261262263264265266267268269270
TimerContext timer = postTimer.time(); try { final Object entity = ((ContainerRequest) containerRequestContext).readEntity(isText ? String.class : Person.class); return Response.ok().entity(entity).build(); } finally { timer.stop(); } } });
275276277278279280281282283284285
try { // read entity in order to test performance of MBR ((ContainerRequest) containerRequestContext).readEntity(isText ? String.class : Person.class); return Response.noContent().build(); } finally { timer.stop(); } } });
7576777879808182838485
public String echo(final String text) { final TimerContext timer = postTimer.time(); try { return text; } finally { timer.stop(); } } @PUT public void put(final String text) {
8283848586878889909192
} @PUT public void put(final String text) { final TimerContext timer = putTimer.time(); timer.stop(); } @GET public String get() { final TimerContext timer = getTimer.time();
7475767778798081828384
8182838485868788899091
909192939495969798