IncrementalGauge
public class IncrementalGauge
A specialized wrapper class for working with Metrics.Gauge
objects for the purpose of an incrementing or decrementing count of active objects.
-
The number of the objects that are currently reported as active.
Declaration
Swift
public var currentCount: Int { get }
-
Increments the current count by the amount specified.
Declaration
Swift
public func increment(by amount: Int = 1)
Parameters
amount
The number to increase the current count by. Default is
1
. -
Decrements the current count by the amount specified.
Declaration
Swift
public func decrement(by amount: Int = 1)
Parameters
amount
The number to decrease the current count by. Default is
1
. -
Resets the current count to
0
.Declaration
Swift
public func reset()