Package com.codahale.metrics

Examples of com.codahale.metrics.Timer


    }
  }
 
  public void updateFromTimerData(Map<String, Timer> timerMap) {
    for(Entry<String, Timer> entry : timerMap.entrySet()) {
      Timer timer = entry.getValue();
      TimerData timerData = new TimerData();
      timerData.setCount(timer.getCount());
      timerData.setMax(timer.getSnapshot().getMax());
      timerData.setMin(timer.getSnapshot().getMin());
      timerData.setMean(timer.getSnapshot().getMean());
      timerData.setMedian(timer.getSnapshot().getMedian());
      timerData.setStdDev(timer.getSnapshot().getStdDev());
      timerData.setPercent75th(timer.getSnapshot().get75thPercentile());
      timerData.setPercent95th(timer.getSnapshot().get95thPercentile());
      timerData.setPercent98th(timer.getSnapshot().get98thPercentile());
      timerData.setPercent99th(timer.getSnapshot().get99thPercentile());
      timerData.setPercent999th(timer.getSnapshot().get999thPercentile());
      timerData.setMeanRate(timer.getMeanRate());
      timerData.setOneMinuteRate(timer.getOneMinuteRate());
      timerData.setFiveMinuteRate(timer.getFiveMinuteRate());
      timerData.setFifteenMinuteRate(timer.getFifteenMinuteRate());
      timerDataMap.put(entry.getKey(), timerData);
    }
  }
View Full Code Here

TOP

Related Classes of com.codahale.metrics.Timer

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.