Instance Propertyswift-metrics 2.6.1CoreMetrics
aggregate
Metrics.swift:303let aggregate: Bool
let aggregate: Bool
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 Bool
A value type whose instances are either true
or false
.
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.
var description: String { get }
let dimensions: [(String, String)]
let label: 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.