Liking cljdoc? Tell your friends :D

org.rssys.metrics.core


active-threadsclj

(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.
sourceraw docstring

avail-processorsclj

source

console-reporterclj

(console-reporter registry report-period report-units)

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.
# 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_.
sourceraw docstring

countercljmacro

(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.
sourceraw docstring

free-jvm-memclj

(free-jvm-mem & {:keys [unit] :or {unit :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.
# 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.
sourceraw docstring

free-swap-sizeclj

(free-swap-size & {:keys [unit] :or {unit :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.
# 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.
sourceraw docstring

gaugecljmacro

(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.
sourceraw docstring

histogramcljmacro

(histogram registry metric-name value)

Measure a distribution of Long values.

Measure a distribution of Long values.
sourceraw docstring

jmx-reporterclj

(jmx-reporter registry)

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.
# 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_.
sourceraw docstring

max-file-descriptorsclj

(max-file-descriptors)

Detect number of max file descriptors.

  • Params: no params.
  • Returns: value - Long number of max file descriptors.
# Detect number of max file descriptors.
* Params:
  no params.
* Returns:
  _value_ - _Long_ number of max file descriptors.
sourceraw docstring

max-jvm-memclj

(max-jvm-mem & {:keys [unit] :or {unit :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.
# 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.
sourceraw docstring

mem-unitsclj

source

metercljmacro

(meter registry metric-name n-events)

Measure the rate of a ticking metric - a meter.

Measure the rate of a ticking metric - a meter.
sourceraw docstring

metric-registryclj

(metric-registry)

Create new instance of com.codahale.metrics.MetricRegistry.

  • Params: no params.
  • Returns: com.codahale.metrics.MetricRegistry instance.
# Create new instance of `com.codahale.metrics.MetricRegistry`.
* Params:
  no params.
* Returns:
  _`com.codahale.metrics.MetricRegistry`_ instance.
sourceraw docstring

open-file-descriptorsclj

(open-file-descriptors)

Detect number of open file descriptors.

  • Params: no params.
  • Returns: value - Long number of open file descriptors.
# Detect number of open file descriptors.
* Params:
  no params.
* Returns:
  _value_ - _Long_ number of open file descriptors.
sourceraw docstring

process-cpu-loadclj

(process-cpu-load)

Detect current CPU load by process.

  • Params: no params.
  • Returns: Float - current CPU load by process from 0.0.. N.
# Detect current CPU load by process.
* Params:
  no params.
* Returns:
  _Float_  - current CPU load by process from 0.0.. N.
sourceraw docstring

rtclj

source

slf4j-reporterclj

(slf4j-reporter registry report-period report-units)

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.
# 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_.
sourceraw docstring

statsd-reporterclj

(statsd-reporter registry report-period report-units host port)

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.
# 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_.
sourceraw docstring

system-cpu-loadclj

(system-cpu-load)

Detect current CPU load in system.

  • Params: no params.
  • Returns: Float - current CPU load in system from 0.0.. N.
# Detect current CPU load in system.
* Params:
  no params.
* Returns:
  _Float_  - current CPU load in system from 0.0.. N.
sourceraw docstring

total-jvm-memclj

(total-jvm-mem & {:keys [unit] :or {unit :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.
# 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.
sourceraw docstring

total-swap-sizeclj

(total-swap-size & {:keys [unit] :or {unit :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.
# 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.
sourceraw docstring

used-jvm-memclj

(used-jvm-mem & {:keys [unit] :or {unit :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.
# 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.
sourceraw docstring

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

× close