Source

metrics-clojure / docs / source / counters.rst

Diff from to

docs/source/counters.rst

 Counters
 ========
 
+Counters are values you can increment and decrement.
+
 Creating
 --------
 
 
     (def users-connected (counter "users-connected"))
 
-Reading
--------
-
 Writing
 -------
 
     (dec! users-connected)
     (dec! users-connected 2)
 
+Reading
+-------
 
+There's only one way to get data from a counter.
+
+``value``
+~~~~~~~~~
+
+You can get the current value of a counter with ``value``::
+
+    (use '[metrics.counters :only (value)])
+
+    (value users-connected)