Liking cljdoc? Tell your friends :D

metrics.counters


clear!clj

(clear! c)

Clear the given counter, resetting its value to zero.

Clear the given counter, resetting its value to zero.
raw docstring

counterclj

(counter title)
(counter reg title)

Create and return a new Counter metric with the given title. If a Counter already exists with the given title, will return that Counter.

Title can be a plain string like "foo" or a vector of three strings (group, type, and title) like:

["myapp" "webserver" "connections"]
Create and return a new Counter metric with the given title. If a
Counter already exists with the given title, will return that Counter.

Title can be a plain string like "foo" or a vector of three strings (group,
type, and title) like:

    ["myapp" "webserver" "connections"]

raw docstring

dec!clj

(dec! c)
(dec! c n)

Decrement the counter by the given amount (or 1 if not specified).

Decrement the counter by the given amount (or 1 if not specified).
raw docstring

defcountercljmacro

(defcounter title)
(defcounter reg title)

Define a new Counter metric with the given title.

The title uses some basic desugaring to let you concisely define metrics:

; Define a counter titled "default.default.foo" into var foo (defcounter foo) (defcounter "foo")

; Define a counter titled "a.b.c" into var c (defcounter [a b c]) (defcounter ["a" "b" "c"]) (defcounter [a "b" c])

Define a new Counter metric with the given title.

The title uses some basic desugaring to let you concisely define metrics:

  ; Define a counter titled "default.default.foo" into var foo
  (defcounter foo)
  (defcounter "foo")

  ; Define a counter titled "a.b.c" into var c
  (defcounter [a b c])
  (defcounter ["a" "b" "c"])
  (defcounter [a "b" c])
raw docstring

inc!clj

(inc! c)
(inc! c n)

Increment the counter by the given amount (or 1 if not specified).

Increment the counter by the given amount (or 1 if not specified).
raw docstring

valueclj

(value c)

Return the current value of the counter.

Return the current value of the counter.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close