Common functionality to ease logging of timed metrics.
Common functionality to ease logging of timed metrics.
(cancel-metric-timer ?timer-name-or-metric)
(cancel-metric-timer ?metric ?more)
Cancels a metric timer. It can either be identified by a timer name
returned by start-metric-timer
or by current namespace, metric, and
(optional) addtional context map.
Cancels a metric timer. It can either be identified by a timer name returned by [[start-metric-timer]] or by current namespace, metric, and (optional) addtional context map.
(cancel-metric-timer-1 timer-name)
Cancels a metric timer, identified by timer-name
.
Cancels a metric timer, identified by `timer-name`.
(log-timed-metric timer-name timer)
Monadic command for logging a timed metric.
Monadic command for logging a timed metric.
(log-timed-metric-timer rec__6325__auto__)
(log-timed-metric-timer data__6326__auto__ v__6327__auto__)
Lens for the timer
field from a [[LogTimedMetric]] record. See active.clojure.logger.timed-metric/log-timed-metric
.
Lens for the `timer` field from a [[LogTimedMetric]] record. See [[active.clojure.logger.timed-metric/log-timed-metric]].
(log-timed-metric-timer-name rec__6325__auto__)
(log-timed-metric-timer-name data__6326__auto__ v__6327__auto__)
Lens for the timer-name
field from a [[LogTimedMetric]] record. See active.clojure.logger.timed-metric/log-timed-metric
.
Lens for the `timer-name` field from a [[LogTimedMetric]] record. See [[active.clojure.logger.timed-metric/log-timed-metric]].
(log-timed-metric? thing)
Is object a LogTimedMetric
record? See active.clojure.logger.timed-metric/log-timed-metric
.
Is object a `LogTimedMetric` record? See [[active.clojure.logger.timed-metric/log-timed-metric]].
(logging-timing ?metric ?m)
(logging-timing ?metric ?more ?m)
A monadic command that executes m
and returns its result, and
also makes a debug log message about the time it took to execute
it, where the message contains the given metric
as name and
help string and more
.
A monadic command that executes `m` and returns its result, and also makes a debug log message about the time it took to execute it, where the message contains the given `metric` as name and help string and `more`.
(make-timer-name namespace metric map)
Construct a TimerName
record.
namespace
(String): access via active.clojure.logger.timed-metric/timer-name-namespace
metric
(Name of the metric that will be logged.): access via active.clojure.logger.timed-metric/timer-name-metric
map
(Map with log context info, keywords to strings.): access via active.clojure.logger.timed-metric/timer-name-map
Construct a `TimerName` record. `namespace` (String): access via [[active.clojure.logger.timed-metric/timer-name-namespace]] `metric` (Name of the metric that will be logged.): access via [[active.clojure.logger.timed-metric/timer-name-metric]] `map` (Map with log context info, keywords to strings.): access via [[active.clojure.logger.timed-metric/timer-name-map]]
(start-metric-timer ?metric & [?more])
Starts a metric timer, identified by metric
and more
.
more
is a map that is merged with the log context that's already active,
if present.
Returns a timer-name object that can be fed to
cancel-metric-timer
or stop-and-log-metric-timer
.
Starts a metric timer, identified by `metric` and `more`. `more` is a map that is merged with the log context that's already active, if present. Returns a timer-name object that can be fed to [[cancel-metric-timer]] or [[stop-and-log-metric-timer]].
(start-metric-timer-1 ns metric more)
Starts a metric timer, identified by ns
, metric
and more
.
more
is a map that is merged with the log context that's already active,
if present.
Starts a metric timer, identified by `ns`, `metric` and `more`. `more` is a map that is merged with the log context that's already active, if present.
(stop-and-log-metric-timer ?timer-name-or-metric)
(stop-and-log-metric-timer ?metric ?more)
Stops a metric timer and logs the time. The timer can either be identified by a timer name
returned by start-metric-timer
or by current namespace, metric, and
(optional) addtional context map.
Returns the elapsed time in milliseconds.
Stops a metric timer and logs the time. The timer can either be identified by a timer name returned by [[start-metric-timer]] or by current namespace, metric, and (optional) addtional context map. Returns the elapsed time in milliseconds.
(stop-and-log-metric-timer-1 timer-name)
Stops a metric timer and logs the time as a metric.
Stops a metric timer and logs the time as a metric.
(timer-name-map rec__6325__auto__)
(timer-name-map data__6326__auto__ v__6327__auto__)
Lens for the map
field (Map with log context info, keywords to strings.) from a [[TimerName]] record. See active.clojure.logger.timed-metric/make-timer-name
.
Lens for the `map` field (Map with log context info, keywords to strings.) from a [[TimerName]] record. See [[active.clojure.logger.timed-metric/make-timer-name]].
(timer-name-metric rec__6325__auto__)
(timer-name-metric data__6326__auto__ v__6327__auto__)
Lens for the metric
field (Name of the metric that will be logged.) from a [[TimerName]] record. See active.clojure.logger.timed-metric/make-timer-name
.
Lens for the `metric` field (Name of the metric that will be logged.) from a [[TimerName]] record. See [[active.clojure.logger.timed-metric/make-timer-name]].
(timer-name-namespace rec__6325__auto__)
(timer-name-namespace data__6326__auto__ v__6327__auto__)
Lens for the namespace
field (String) from a [[TimerName]] record. See active.clojure.logger.timed-metric/make-timer-name
.
Lens for the `namespace` field (String) from a [[TimerName]] record. See [[active.clojure.logger.timed-metric/make-timer-name]].
(timer-name? thing)
Is object a TimerName
record? See active.clojure.logger.timed-metric/make-timer-name
.
Is object a `TimerName` record? See [[active.clojure.logger.timed-metric/make-timer-name]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close