Commits

Steve Losh committed 9f89ac1

Docstrings.

  • Participants
  • Parent commits 2934725

Comments (0)

Files changed (4)

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

 (defn counter
   "Create and return a new Counter metric with the given title.
 
-  Title can be a plain string like \"foo\" or a vector of three strings like:
+  Title can be a plain string like \"foo\" or a vector of three strings (group,
+  type, and title) like:
 
       [\"myapp\" \"webserver\" \"connections\"]
 

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

 (defmacro defgauge
   "Define a new Gauge metric with the given title.
 
-   The rest of the arguments may be a body form or function to call to
-   retrieve the value of the Gauge."
+  The rest of the arguments may be a body form or function to call to
+  retrieve the value of the Gauge."
   [title & body]
   (cond (and (= 1 (count body)) (and (symbol? (first body))
                                      (fn? (eval (first body)))))

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

                     event-type
                     TimeUnit/SECONDS))
 
-(defmacro defmeter [title event-type]
+(defmacro defmeter
+  "Define a new Meter metric with a given title and event type."
+  [title event-type]
   `(def ~title (meter ~(str title) ~event-type)))
 
 

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

                     TimeUnit/MILLISECONDS
                     TimeUnit/SECONDS))
 
-(defmacro deftimer [title]
+(defmacro deftimer
+  "Define a new Timer metric with the given title."
+  [title]
   `(def ~title (timer ~(str title))))