class MetricsCr::Metrics::Counter
- MetricsCr::Metrics::Counter
- MetricsCr::Metric
- Reference
- Object
Defined in:
metrics_cr/metrics/counter.crInstance Method Summary
-
#increment(by : UInt64 = 1) : Nil
Increments the counter by provided value.
- #value : UInt64
Instance methods inherited from class MetricsCr::Metric
name : String
name
Constructor methods inherited from class MetricsCr::Metric
new(name : String)
new
Instance Method Detail
def increment(by : UInt64 = 1) : Nil
#
Increments the counter by provided value.
counter = MetricsCr::Metrics::Counter.new(name: "test")
counter.increment(by: 1) # => Nil
counter.increment # => Nil
counter.value # => 2