(apply-aggregated-data n data)
given metric names and the aggregated data set, apply it to the app-stats bean appropriately.
given metric names and the aggregated data set, apply it to the app-stats bean appropriately.
(initialize-stats namespace
stat-spec
&
{:keys [aggregation_period] :or {aggregation_period 60000}})
Initialize stats for this app. stat-spec is an initial map of stats stat-spec should be a vector of stats in the form :name name of stat, i.e. :velocity :init the initial val
The default aggregation period is 1 minute, you can change that with :aggregation_period
Initialize stats for this app. stat-spec is an initial map of stats stat-spec should be a vector of stats in the form :name name of stat, i.e. :velocity :init the initial val The default aggregation period is 1 minute, you can change that with :aggregation_period
(make-stat args)
Func to create stats from registry Usually you want to call initialize-stats with a complete spec. Example: (make-stat {:type :counter :name :foo :initial_value 3)
Func to create stats from registry Usually you want to call initialize-stats with a complete spec. Example: (make-stat {:type :counter :name :foo :initial_value 3)
(register-stat! stat)
Registers a statistic with statman.
Registers a statistic with statman.
Right now there is only 1 type of statistic, but this is the registry mapping symbol names to constructor functions for the make-stat func.
Right now there is only 1 type of statistic, but this is the registry mapping symbol names to constructor functions for the make-stat func.
(update-stat! name value)
Given a stat :foo call its update-data function with value (update-data :foo 42.0)
Given a stat :foo call its update-data function with value (update-data :foo 42.0)
(with-timing! stat-name body)
Track with timing stat-name is the name of the stat to record result with There are currently no options until we add rate here Example: (with-timing :foo ...)
Track with timing stat-name is the name of the stat to record result with There are currently no options until we add rate here Example: (with-timing :foo ...)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close