init(label:dimensions:)
Create a new Meter
.
convenience init(label: String, dimensions: [(String, String)] = [])
Parameters
- label
The label for the
Meter
.- dimensions
The dimensions for the
Meter
.
Create a new Meter
.
convenience init(label: String, dimensions: [(String, String)] = [])
s11CoreMetrics5MeterC5label10dimensionsACSS_SaySS_SStGtcfc
What are these?2TQ4O
The label for the Meter
.
The dimensions for the Meter
.
import CoreMetrics
A Metrics API package for Swift.
final class Meter
A meter is similar to a gauge, it is a metric that represents a single numerical value that can arbitrarily go up and down. Meters are typically used for measured values like temperatures or current memory usage, but also “counts” that can go up and down, like the number of active threads.
@frozen struct String
A Unicode string value that is a collection of characters.
init(label: String, dimensions: [(String, String)], handler: MeterHandler)
Alternative way to create a new Meter
, while providing an explicit MeterHandler
.
let _handler: MeterHandler
_handler
is only public to allow access from MetricsTestKit
. Do not consider it part of the public API.
var description: String { get }
let dimensions: [(String, String)]
let label: String
func decrement()
Decrement the Meter by one.
func decrement<DataType>(by amount: DataType) where DataType : BinaryFloatingPoint
Decrement the Meter.
func destroy()
Signal the underlying metrics library that this recorder will never be updated again. In response the library MAY decide to eagerly release any resources held by this Recorder
.
func increment()
Increment the Meter by one.
func increment<DataType>(by amount: DataType) where DataType : BinaryFloatingPoint
Increment the Meter.
func set<DataType>(_ value: DataType) where DataType : BinaryFloatingPoint
Set a value.
func set<DataType>(_ value: DataType) where DataType : BinaryInteger
Set a value.