Package org.waveprotocol.box.stat

Examples of org.waveprotocol.box.stat.Timed


      });

  @Override
  public Object invoke(MethodInvocation methodInvocation) throws Throwable {
    Method method = methodInvocation.getMethod();
    Timed timed = method.getAnnotation(Timed.class);
    String name = timed.value();
    if (name.isEmpty()) {
      name = nameCache.get(methodInvocation.getMethod());
    }
    Timer timer;
    if (timed.isRequest()) {
      timer = Timing.startRequest(name, timed.threshold());
    } else {
      timer = Timing.start(name, timed.threshold());
    }
    try {
      return methodInvocation.proceed();
    } finally {
      Timing.stop(timer);
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.stat.Timed

Copyright © 2018 www.massapicom. 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.