Instance Propertyswift-metrics 2.6.1CoreMetrics
label
Metrics.swift:301let label: String
let label: String
import CoreMetrics
A Metrics API package for Swift.
class Recorder
A recorder collects observations within a time window (usually things like response sizes) and can provide aggregated information about the data sample, for example, count, sum, min, max and various quantiles.
@frozen struct String
A Unicode string value that is a collection of characters.
convenience init(label: String, dimensions: [(String, String)] = [], aggregate: Bool = true)
Create a new Recorder
.
init(label: String, dimensions: [(String, String)], aggregate: Bool, handler: RecorderHandler)
Alternative way to create a new Recorder
, while providing an explicit RecorderHandler
.
let _handler: RecorderHandler
_handler
is only public to allow access from MetricsTestKit
. Do not consider it part of the public API.
let aggregate: Bool
var description: String { get }
let dimensions: [(String, String)]
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 record<DataType>(_ value: DataType) where DataType : BinaryFloatingPoint
Record a value.
func record<DataType>(_ value: DataType) where DataType : BinaryInteger
Record a value.