Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.metrics.annotation;
An annotation for marking a method of a Guice-provided object as timed.

Given a method like this:

     \@Timed(name = "fancyName", rateUnit = TimeUnit.SECONDS, durationUnit =
     public String fancyName(String name) {
         return "Sir Captain " + name;

A timer for the defining class with the name fancyName will be created and each time the #fancyName(String) method is invoked, the method's execution will be timed.

public @interface Timed {
The group of the timer.
    String group() default "";

The type of the timer.
    String type() default "";

The name of the timer.
    String name() default "";

The time unit of the timer's rate.
    TimeUnit rateUnit() default .;

The time unit of the timer's duration.
New to GrepCode? Check out our FAQ X