Source

metrics-clojure / metrics-clojure-core / src / metrics / histograms.clj

Diff from to

File metrics-clojure-core/src/metrics/histograms.clj

 (ns metrics.histograms
-  (:use [metrics.utils :only (metric-name get-percentiles)])
+  (:use [metrics.utils :only (metric-name get-percentiles desugared-title)])
   (:import (com.yammer.metrics Metrics))
   (:import (com.yammer.metrics.core Histogram MetricName)))
 
 (defmacro defhistogram
   "Define a Histogram metric with the given title."
   [title & args]
-  `(def ~title (histogram ~(str title) ~@args)))
+  (let [[s title] (desugared-title title)]
+    `(def ~s (histogram ~title ~@args))))
 
 
 ; Read ------------------------------------------------------------------------