Package com.yammer.metrics.core

Examples of com.yammer.metrics.core.TimerContext.stop()


    public String get() {
        final TimerContext timer = getTimer.time();
        try {
            return "text";
        } finally {
            timer.stop();
        }
    }
}
View Full Code Here


                        }
                    }

                    return Response.ok().entity(entity).build();
                } finally {
                    timer.stop();
                }
            }
        });

        builder.addMethod("POST").consumes(config.getType()).produces(config.getType()).handledBy(new Inflector<ContainerRequestContext, Object>() {
View Full Code Here

                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();
                }

            }
        });
View Full Code Here

                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();
                }
            }
        });

View Full Code Here

    public String echo(final String text) {
        final TimerContext timer = postTimer.time();
        try {
            return text;
        } finally {
            timer.stop();
        }
    }

    @PUT
    public void put(final String text) {
View Full Code Here

    }

    @PUT
    public void put(final String text) {
        final TimerContext timer = putTimer.time();
        timer.stop();
    }

    @GET
    public String get() {
        final TimerContext timer = getTimer.time();
View Full Code Here

    public String get() {
        final TimerContext timer = getTimer.time();
        try {
            return "text";
        } finally {
            timer.stop();
        }
    }
}
View Full Code Here

    public String echo(final String text) {
        final TimerContext timer = postTimer.time();
        try {
            return text;
        } finally {
            timer.stop();
        }
    }

    @PUT
    public void put(final String text) {
View Full Code Here

    }

    @PUT
    public void put(final String text) {
        final TimerContext timer = putTimer.time();
        timer.stop();
    }

    @GET
    public String get() {
        final TimerContext timer = getTimer.time();
View Full Code Here

    public String get() {
        final TimerContext timer = getTimer.time();
        try {
            return "text";
        } finally {
            timer.stop();
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.