MCPcopy Create free account
hub / github.com/3rdparty/libprocess / Counter

Method Counter

include/process/metrics/counter.hpp:32–37  ·  view source on GitHub ↗

'name' is the unique name for the instance of Counter being constructed. This is what will be used as the key in the JSON endpoint. 'window' is the amount of history to keep for this Metric.

Source from the content-addressed store, hash-verified

30 // This is what will be used as the key in the JSON endpoint.
31 // 'window' is the amount of history to keep for this Metric.
32 Counter(const std::string& name, const Option<Duration>& window = None())
33 : Metric(name, window),
34 data(new Data())
35 {
36 push(static_cast<double>(data->value.load()));
37 }
38
39 ~Counter() override {}
40

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected