(active-threads)
# Detect an estimate of the number of active threads in the current thread's thread group and its subgroups. * Params: no params. * Returns: _Long_ - number of active threads.
(console-reporter registry report-period report-units)
registry
- com.codahale.metrics.MetricRegistry
instance.
report-period
- Long number of units for report period. (e.g. 10)
report-units
- java.util.concurrent.TimeUnit
instance (e.g. TimeUnit/SECONDS)# Create console reporter for given registry and start it. * Params: **`registry`** - `com.codahale.metrics.MetricRegistry` instance. **`report-period`** - _Long_ number of units for report period. (e.g. 10) **`report-units`** - `java.util.concurrent.TimeUnit` instance (e.g. TimeUnit/SECONDS) * Returns: _nil_.
(counter registry metric-name delta)
Update a single Numeric/Long metric by the delta
amount.
Update a single Numeric/Long metric by the `delta` amount.
(free-jvm-mem & {:keys [unit] :or {unit :mb}})
{:keys [unit]}
- optional parameter from mem-units, default value is :mb# Get the amount of free memory in the Java Virtual Machine. * Params: **`{:keys [unit]}`** - optional parameter from mem-units, default value is :mb * Example: (free-jvm-mem) and (free-jvm-mem :unit :mb) returns free memory in megabytes. * Returns: _Long_ - amount of free memory in bytes or in memory units.
(free-swap-size & {:keys [unit] :or {unit :mb}})
{:keys [unit]}
- optional parameter from mem-units, default value is :mb# Detect free swap size. * Params: **`{:keys [unit]}`** - optional parameter from mem-units, default value is :mb * Returns: _value_ - _Long_ number of free swap size in bytes or in memory units.
(gauge registry metric-name value-fn)
Register a single metric value, returned by a 0-arg function. This function will be called everytime the Guage value is requested.
Register a single metric value, returned by a 0-arg function. This function will be called everytime the Guage value is requested.
(histogram registry metric-name value)
Measure a distribution of Long values.
Measure a distribution of Long values.
(jmx-reporter registry)
Domain name is "org.rssys.metrics".
Example:
registry
- com.codahale.metrics.MetricRegistry
instance.# Create JMX reporter for given registry and start it. Domain name is "org.rssys.metrics". Example: 1. Run java app with args: -Dcom.sun.management.jmxremote.port=10999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false 2. Attach jconsole: jconsole localhost:10999 3. See domain - org.rssys.metrics * Params: **`registry`** - `com.codahale.metrics.MetricRegistry` instance. * Returns: _nil_.
(max-file-descriptors)
# Detect number of max file descriptors. * Params: no params. * Returns: _value_ - _Long_ number of max file descriptors.
(max-jvm-mem & {:keys [unit] :or {unit :mb}})
{:keys [unit]}
- optional parameter from mem-units, default value is :mb# Returns the maximum amount of memory that the Java virtual machine will attempt to use. * Params: **`{:keys [unit]}`** - optional parameter from mem-units, default value is :mb * Example: (max-jvm-mem) and (max-jvm-mem :unit :mb) returns max memory in megabytes. * Returns: _Long_ - amount of max memory in bytes or in memory units.
(meter registry metric-name n-events)
Measure the rate of a ticking metric - a meter.
Measure the rate of a ticking metric - a meter.
(metric-registry)
com.codahale.metrics.MetricRegistry
.com.codahale.metrics.MetricRegistry
instance.# Create new instance of `com.codahale.metrics.MetricRegistry`. * Params: no params. * Returns: _`com.codahale.metrics.MetricRegistry`_ instance.
(open-file-descriptors)
# Detect number of open file descriptors. * Params: no params. * Returns: _value_ - _Long_ number of open file descriptors.
(process-cpu-load)
# Detect current CPU load by process. * Params: no params. * Returns: _Float_ - current CPU load by process from 0.0.. N.
(slf4j-reporter registry report-period report-units)
Logger name is "org.rssys.metrics".
registry
- com.codahale.metrics.MetricRegistry
instance.
report-period
- Long number of units for report period. (e.g. 10)
report-units
- java.util.concurrent.TimeUnit
instance (e.g. TimeUnit/SECONDS)# Create SLF4j reporter for given registry and start it. Logger name is "org.rssys.metrics". * Params: **`registry`** - `com.codahale.metrics.MetricRegistry` instance. **`report-period`** - _Long_ number of units for report period. (e.g. 10) **`report-units`** - `java.util.concurrent.TimeUnit` instance (e.g. TimeUnit/SECONDS) * Returns: _nil_.
(statsd-reporter registry report-period report-units host port)
registry
- com.codahale.metrics.MetricRegistry
instance.
report-period
- Long number of units for report period. (e.g. 10)
report-units
- java.util.concurrent.TimeUnit
instance (e.g. TimeUnit/SECONDS)
host
- String
hostname or ip of StatsD server.
port
- Long
port of StatsD server.# Create StatsD reporter for given registry and start it. * Params: **`registry`** - `com.codahale.metrics.MetricRegistry` instance. **`report-period`** - _Long_ number of units for report period. (e.g. 10) **`report-units`** - `java.util.concurrent.TimeUnit` instance (e.g. TimeUnit/SECONDS) **`host`** - `String` hostname or ip of StatsD server. **`port`** - `Long` port of StatsD server. * Returns: _nil_.
(system-cpu-load)
# Detect current CPU load in system. * Params: no params. * Returns: _Float_ - current CPU load in system from 0.0.. N.
(total-jvm-mem & {:keys [unit] :or {unit :mb}})
The value returned by this method may vary over time, depending on the host environment.
{:keys [unit]}
- optional parameter from mem-units, default value is :mb# Returns the total amount of memory in the Java virtual machine. The value returned by this method may vary over time, depending on the host environment. * Params: **`{:keys [unit]}`** - optional parameter from mem-units, default value is :mb * Example: (total-jvm-mem) and (total-jvm-mem :unit :mb) returns total memory in megabytes. * Returns: _Long_ - amount of total memory in bytes or in memory units.
(total-swap-size & {:keys [unit] :or {unit :mb}})
{:keys [unit]}
- optional parameter from mem-units, default value is :mb# Detect total swap size. * Params: **`{:keys [unit]}`** - optional parameter from mem-units, default value is :mb * Returns: _value_ - _Long_ number of swap size in bytes or in memory units.
(used-jvm-mem & {:keys [unit] :or {unit :mb}})
{:keys [unit]}
- optional parameter from mem-units, default value is :mb# Detect current amount of memory used by Java virtual machine. * Params: **`{:keys [unit]}`** - optional parameter from mem-units, default value is :mb * Returns: _Long_ - amount of used memory in bytes or in memory units.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close