Liking cljdoc? Tell your friends :D

metrics.histograms


defhistogramcljmacro

(defhistogram title)
(defhistogram reg title)

Define a Histogram metric with the given title.

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

; Define a histogram titled "default.default.foo" into var foo (defhistogram foo) (defhistogram "foo")

; Define a histogram titled "a.b.c" into var c (defhistogram [a b c]) (defhistogram ["a" "b" "c"]) (defhistogram [a "b" c])

Define a Histogram metric with the given title.

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

  ; Define a histogram titled "default.default.foo" into var foo
  (defhistogram foo)
  (defhistogram "foo")

  ; Define a histogram titled "a.b.c" into var c
  (defhistogram [a b c])
  (defhistogram ["a" "b" "c"])
  (defhistogram [a "b" c])
sourceraw docstring

histogramclj

(histogram title)
(histogram reg title)

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

By default a biased Histogram is created. This is probably what you want. You cannot create an unbiased Histogram from this fn, you'll need to look into the Java interop for that.

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

By default a biased Histogram is created.  This is probably what you
want. You cannot create an unbiased Histogram from this fn, you'll
need to look into the Java interop for that.
sourceraw docstring

largestclj

(largest h)

Return the largest value recorded by the given Histogram.

Return the largest value recorded by the given Histogram.
sourceraw docstring

meanclj

(mean h)

Return the mean value of the given histogram.

Return the mean value of the given histogram.
sourceraw docstring

number-recordedclj

(number-recorded h)

Return the number of values recorded by the given Histogram.

Return the number of values recorded by the given Histogram.
sourceraw docstring

percentilesclj

(percentiles h)
(percentiles h ps)

Return a mapping of percentiles to their values for the given Histogram.

For example:

(percentiles myhistogram [0.5 0.9 1.0]) ;=> {0.5 200, 0.9 240, 1.0 500}

This means that:

  • 50% of the values recorded by this Histogram were less than or equal to 200
  • 90% were less than or equal to 240
  • 100% were less than or equal to 500

If you don't pass a list of desired percentiles, the default will be [0.75 0.95 0.99 0.999 1.0].

Return a mapping of percentiles to their values for the given Histogram.

For example:

  (percentiles myhistogram [0.5 0.9 1.0])
  ;=> {0.5 200, 0.9 240, 1.0 500}

This means that:

* 50% of the values recorded by this Histogram were less than or equal to 200
* 90% were less than or equal to 240
* 100% were less than or equal to 500

If you don't pass a list of desired percentiles, the default will be
[0.75 0.95 0.99 0.999 1.0].
sourceraw docstring

sampleclj

(sample h)

Return the values in the given histogram's current sampling.

This is almost certainly NOT what you want. Read up on how these histograms work and make sure you understand it before using this function.

Return the values in the given histogram's current sampling.

This is almost certainly NOT what you want. Read up on how these histograms
work and make sure you understand it before using this function.
sourceraw docstring

smallestclj

(smallest h)

Return the smallest value recorded by the given Histogram.

Return the smallest value recorded by the given Histogram.
sourceraw docstring

std-devclj

(std-dev h)

Return the standard deviation of the given Histogram.

Return the standard deviation of the given Histogram.
sourceraw docstring

update!clj

(update! h n)

Record a value in the given Histogram.

Record a value in the given Histogram.
sourceraw docstring

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

× close