Source

metrics-clojure / src / metrics / meters.clj

Diff from to

File src/metrics/meters.clj

 (ns metrics.meters
   (use [metrics.utils :only (metric-name)])
   (import (com.yammer.metrics Metrics))
-  (import (com.yammer.metrics.core MeterMetric))
+  (import (com.yammer.metrics.core Meter))
   (import (java.util.concurrent TimeUnit)))
 
 
 
 
 ; Read ------------------------------------------------------------------------
-(defn rates [^MeterMetric m]
+(defn rates [^Meter m]
   {1 (.oneMinuteRate m)
    5 (.fiveMinuteRate m)
    15 (.fifteenMinuteRate m)})
 
-(defn rate-one [^MeterMetric m]
+(defn rate-one [^Meter m]
   (.oneMinuteRate m))
 
-(defn rate-five [^MeterMetric m]
+(defn rate-five [^Meter m]
   (.fiveMinuteRate m))
 
-(defn rate-fifteen [^MeterMetric m]
+(defn rate-fifteen [^Meter m]
   (.fifteenMinuteRate m))
 
-(defn rate-mean [^MeterMetric m]
+(defn rate-mean [^Meter m]
   (.meanRate m))
 
 
 ; Write -----------------------------------------------------------------------
 (defn mark!
-  ([^MeterMetric m]
+  ([^Meter m]
    (mark! m 1))
-  ([^MeterMetric m n]
+  ([^Meter m n]
    (.mark m (long n))
    m))