File: removing.rst

package info (click to toggle)
metrics-clojure 2.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 404 kB
  • sloc: makefile: 135; xml: 99; python: 22
file content (17 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Removing Metrics
================

You can remove metrics as long as you know their names::

    (require '[metrics.core :refer [remove-metric]])

    (remove-metric "files-served")

You can use the sequence form of :ref:`metric names <metric-names>` here too, of
course::

    (remove-metric ["webservice" "views" "response-time"])

You can also remove a bunch of metrics by using a predicate::

    (remove-metrics #(= "webservice" (first %)))