Liking cljdoc? Tell your friends :D

barometer.core

This is a pretty thin wrapper of Coda Hale (https://metrics.dropwizard.io). Unlike the metrics-clojure library (https://github.com/metrics-clojure/metrics-clojure), this doesn't destroy your ability to program to interfaces common to the different kinds of metrics.

The one major constraint this wrapper adds is that you must supply a docstring when you create metrics. Do it. Don't cheat. We don't need anonymous mysterious metrics out there. If it's worth recording, it's worth saying what it is!!

On that note, you can get explanations for each metric with (explanation) and (explain).

This is a pretty thin wrapper of Coda Hale
(https://metrics.dropwizard.io).  Unlike the metrics-clojure library
(https://github.com/metrics-clojure/metrics-clojure), this doesn't
destroy your ability to program to interfaces common to the
different kinds of metrics.

The one major constraint this wrapper adds is that you must supply a
docstring when you create metrics. Do it. Don't cheat. We don't need
anonymous mysterious metrics out there. If it's worth recording,
it's worth saying what it is!!

On that note, you can get explanations for each metric with
(explanation) and (explain).
raw docstring

console-reporterclj

(console-reporter registry)

A simple console reporter for debugging/dev purposes.

A simple console reporter for debugging/dev purposes.
sourceraw docstring

countclj

(count metric)

Returns the count recorded by this metric.

Returns the count recorded by this metric.
sourceraw docstring

counterclj

(counter explanation)

Creates a codahale counter [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Counter.html] with the provided explanation string.

Creates a codahale counter [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Counter.html]
with the provided explanation string.
sourceraw docstring

countersclj

(counters reg)
(counters reg filter)

Returns a map name->metric for all counters registered in this registry.

Returns a map name->metric for all counters registered in this registry.
sourceraw docstring

decrementclj

(decrement counter)
(decrement counter n)

Decrement a counter by 1 or by the amount specified.

Decrement a counter by 1 or by the amount specified.
sourceraw docstring

DEFAULTclj

source

default-registryclj

(default-registry)

Default registry available for use by all consumers of barometer

Default registry available for use by all consumers of barometer
sourceraw docstring

ensure-nameclj

(ensure-name name-repr)

Metric names can be specified as either a dotted string or a vector of strings.

Metric names can be specified as either a dotted string or a vector of strings.
sourceraw docstring

explainclj

(explain this)

Prints a string containing the documentation for this thing.

Prints a string containing the documentation for this thing.
sourceraw docstring

explanationclj

(explanation this)

Returns a string containing the documentation for this thing.

Returns a string containing the documentation for this thing.
sourceraw docstring

fifteen-minute-rateclj

(fifteen-minute-rate metric)

Gives the frequency with which this metric was triggered in the last fifteen minutes.

Gives the frequency with which this metric was triggered in the last fifteen minutes.
sourceraw docstring

five-minute-rateclj

(five-minute-rate metric)

Gives the frequency with which this metric was triggered in the last five minutes.

Gives the frequency with which this metric was triggered in the last five minutes.
sourceraw docstring

gaugeclj

(gauge fn explanation)

Creates a codahale gauge [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Gauge.html] with the provided explanation string.

Creates a codahale gauge [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Gauge.html]
with the provided explanation string.
sourceraw docstring

gaugesclj

(gauges reg)
(gauges reg filter)

Returns a map name->metric for all gauges registered in this registry.

Returns a map name->metric for all gauges registered in this registry.
sourceraw docstring

get-metricclj

(get-metric reg name)

Retrieves the metric registered under this name. Returns nil if none is found.

Retrieves the metric registered under this name. Returns nil if none is found.
sourceraw docstring

get-or-registercljmacro

(get-or-register reg name construction-form)

If a metric is already registered under this name, get-or-register simply returns that metric. Otherwise, 'construction-form' is evaluated and its result (a metric, presumably) is registered. Example: (def my-metric (get-or-register registry 'my-name (meter "A meter!")))

If a metric is already registered under this name, get-or-register simply returns that metric.
Otherwise, 'construction-form' is evaluated and its result (a metric, presumably) is registered.
Example: (def my-metric (get-or-register registry 'my-name (meter "A meter!")))
sourceraw docstring

graphite-reporterclj

(graphite-reporter registry graphite-url graphite-port)
(graphite-reporter registry graphite-url graphite-port prefix)

A reporter for streaming metrics to a graphite server. http://graphiteapp.org

A reporter for streaming metrics to a graphite server. http://graphiteapp.org
sourceraw docstring

histogramclj

(histogram reservoir explanation)

Creates a codahale histogram [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Histogram.html with the provided explanation string.

Creates a codahale histogram [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Histogram.html
with the provided explanation string.
sourceraw docstring

histogramsclj

(histograms reg)
(histograms reg filter)

Returns a map name->metric for all histograms registered in this registry.

Returns a map name->metric for all histograms registered in this registry.
sourceraw docstring

incrementclj

(increment counter)
(increment counter n)

Increment a counter by 1 or by the amount specified.

Increment a counter by 1 or by the amount specified.
sourceraw docstring

maxclj

(max o)

Gives the maximum value captured by this metric/snapshot.

Gives the maximum value captured by this metric/snapshot.
sourceraw docstring

meanclj

(mean o)

Gives the mean value recorded by this metric/snapshot.

Gives the mean value recorded by this metric/snapshot.
sourceraw docstring

mean-rateclj

(mean-rate metric)

Gives the mean frequency with which this metric has been triggered.

Gives the mean frequency with which this metric has been triggered.
sourceraw docstring

medianclj

(median o)

Gives the median value recorded by this metric/snapshot.

Gives the median value recorded by this metric/snapshot.
sourceraw docstring

meterclj

(meter explanation)
(meter clock explanation)

Creates a codahale meter [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Meter.html] with the provided explanation string.

Creates a codahale meter [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Meter.html]
with the provided explanation string.
sourceraw docstring

metersclj

(meters reg)
(meters reg filter)

Returns a map name->metric for all meters registered in this registry.

Returns a map name->metric for all meters registered in this registry.
sourceraw docstring

metric-filterclj

(metric-filter f)

Pass in a function that takes arguments name-of-metric and metric. It should return a truthy value if the filter matches.

Pass in a function that takes arguments name-of-metric and metric. It should
return a truthy value if the filter matches.
sourceraw docstring

metricsclj

(metrics ms)

Returns a map name->metric for all metrics contained by this metric set.

Returns a map name->metric for all metrics contained by this metric set.
sourceraw docstring

minclj

(min o)

Gives the minimum value captured by this metric/snapshot.

Gives the minimum value captured by this metric/snapshot.
sourceraw docstring

namesclj

(names reg)

Returns a set containing all the names registered in this registry.

Returns a set containing all the names registered in this registry.
sourceraw docstring

one-minute-rateclj

(one-minute-rate metric)

Gives the frequency with which this metric was triggered in the last five minutes.

Gives the frequency with which this metric was triggered in the last five minutes.
sourceraw docstring

quantileclj

(quantile o q)

Gives the value recorded by this metric/snapshot in the specified quantile.

Gives the value recorded by this metric/snapshot in the specified quantile.
sourceraw docstring

registerclj

(register reg name metric)

Registers the given metric to the given name in this registry. If a metric is already registered under this name, it is replaced and a warning is logged.

Registers the given metric to the given name in this registry. If a metric is already registered under this name, it is replaced and a warning is logged.
sourceraw docstring

register-allclj

(register-all reg name->metric)
(register-all reg prefix name->metric)

Registers to the given names the corresponding metrics. If a metric is already registered under this name, it is replaced and a warning is logged.

Registers to the given names the corresponding metrics. If a metric is already registered under this name, it is replaced and a warning is logged.
sourceraw docstring

registryclj

(registry)
(registry explanation)

The explanation is optional.

The explanation is optional.
sourceraw docstring

remove-matchingclj

(remove-matching reg filter)

Removes from this registry any metric that matches the given filter.

Removes from this registry any metric that matches the given filter.
sourceraw docstring

remove-metricclj

(remove-metric reg name)

Removes from this registry any metric registered under the given name.

Removes from this registry any metric registered under the given name.
sourceraw docstring

reservoirclj

(reservoir)
source

sizeclj

(size o)

Gives the number of values recorded by this metric/snapshot.

Gives the number of values recorded by this metric/snapshot.
sourceraw docstring

snapshotclj

(snapshot metric)

Gives an instantaneous snapshot of the statistical properties of the metric.

Gives an instantaneous snapshot of the statistical properties of the metric.
sourceraw docstring

std-devclj

(std-dev o)

Gives the standard deviation of the value recorded by this metric/snapshot.

Gives the standard deviation of the value recorded by this metric/snapshot.
sourceraw docstring

timeclj

(time metric fn)

Runs the fn, returns its return value.

Runs the fn, returns its return value.
sourceraw docstring

timerclj

(timer explanation)
(timer reservoir explanation)
(timer reservoir clock explanation)

Creates a codahale timer [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Timer.html] with the provided explanation string.

Creates a codahale timer [https://metrics.dropwizard.io/3.2.0/apidocs/com/codahale/metrics/Timer.html]
with the provided explanation string.
sourceraw docstring

timersclj

(timers reg)
(timers reg filter)

Returns a map name->metric for all timers registered in this registry.

Returns a map name->metric for all timers registered in this registry.
sourceraw docstring

updateclj

(update metric)
(update metric value)

Updates with number of occurrences, or latest value, or whatever it makes sense to tick/mark/update this metric with.

Updates with number of occurrences, or latest value, or whatever it makes sense to tick/mark/update this metric with.
sourceraw docstring

valueclj

(value metric)

For metrics that record a single value, this returns it.

For metrics that record a single value, this returns it.
sourceraw docstring

valuesclj

(values o)

Gives an array of all values captured by this metric/snapshot.

Gives an array of all values captured by this metric/snapshot.
sourceraw docstring

vomit-all-timersclj

(vomit-all-timers registry)

Named in accordance with the sense that this is not how things should be done if we happened to take the time to decide how to do such things instead of simply doing them.

Returns a nested map of stats reported by all timers registered in the registry.

Named in accordance with the sense that this is not how things should be done
if we happened to take the time to decide how to do such things instead of simply
doing them.

Returns a nested map of stats reported by all timers registered in the registry.
sourceraw docstring

vomit-timerclj

(vomit-timer timer)

Named in accordance with the sense that this is not how things should be done if we happened to take the time to decide how to do such things instead of simply doing them.

Returns a map of stats reported by the timer.

Named in accordance with the sense that this is not how things should be done
if we happened to take the time to decide how to do such things instead of simply
doing them.

Returns a map of stats reported by the timer.
sourceraw docstring

with-timercljmacro

(with-timer timer & body)

Times the execution of the body, even if an exception is thrown.

Times the execution of the body, even if an exception is thrown.
sourceraw docstring

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

× close