From e0ec4aea36ccc624613d6215dc61396d04eb70b5 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Wed, 31 Jul 2019 06:55:38 +0900 Subject: [PATCH] define record() more explicitly that it is a "set the value" (#35) motivation: define record() more explicitly that it is a "set the value" operation as it seemed to be confusing when implementing or using the API. changes: update API docs accordingly --- Sources/CoreMetrics/Metrics.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/CoreMetrics/Metrics.swift b/Sources/CoreMetrics/Metrics.swift index 4328087..433e90b 100644 --- a/Sources/CoreMetrics/Metrics.swift +++ b/Sources/CoreMetrics/Metrics.swift @@ -135,6 +135,9 @@ public class Recorder { /// Record a value. /// + /// Recording a value is meant to have "set" semantics, rather than "add" semantics. + /// This means that the value of this `Recorder` will match the passed in value, rather than accumulate and sum the values up. + /// /// - parameters: /// - value: Value to record. @inlinable @@ -144,6 +147,9 @@ public class Recorder { /// Record a value. /// + /// Recording a value is meant to have "set" semantics, rather than "add" semantics. + /// This means that the value of this `Recorder` will match the passed in value, rather than accumulate and sum the values up. + /// /// - parameters: /// - value: Value to record. @inlinable