class MetricsCr::Metrics::Counter

Defined in:

metrics_cr/metrics/counter.cr

Instance Method Summary

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

[View source]
def value : UInt64 #

[View source]