1. Steve Losh
  2. metrics-clojure

Source

metrics-clojure / src / metrics / core.clj

Steve Losh caf4e68 
Steve Losh 33deb3b 



Steve Losh caf4e68 

Steve Losh 0a3a634 


Steve Losh 33deb3b 
Steve Losh caf4e68 

Steve Losh 0a3a634 


Steve Losh caf4e68 
Steve Losh 0a3a634 
(ns metrics.core
  (:use [metrics.utils :only (metric-name)])
  (:import (com.yammer.metrics Metrics))
  (:import (com.yammer.metrics.reporting ConsoleReporter))
  (:import (java.util.concurrent TimeUnit)))


(defn remove-metric
  "Remove the metric with the given title."
  [title]
  (.removeMetric (Metrics/defaultRegistry) (metric-name title)))


(defn report-to-console
  "Report all metrics to standard out every few seconds."
  [seconds]
  (ConsoleReporter/enable seconds TimeUnit/SECONDS))