=api #34 define record() more explicitly that it is a "set the value" operation

... as it seemed to be confusing when implementing or using the API.
This commit is contained in:
Konrad `ktoso` Malawski 2019-07-08 10:37:23 +09:00
parent e89f83704c
commit 22dd2161da
No known key found for this signature in database
GPG Key ID: 0303D9CCB6E9DE2A
1 changed files with 8 additions and 0 deletions

View File

@ -136,6 +136,10 @@ public class Recorder {
/// Record a value.
///
/// Recording a value is meant to have "set" semantics, rather than "add" semantics.
/// Metrics implementations may choose to provide additional "add" or other operations meant to modify an existing value,
/// however the only operation required by this API is the ability to set a specific value.
///
/// - parameters:
/// - value: Value to record.
@inlinable
@ -145,6 +149,10 @@ public class Recorder {
/// Record a value.
///
/// Recording a value is meant to have "set" semantics, rather than "add" semantics.
/// Metrics implementations may choose to provide additional "add" or other operations meant to modify an existing value,
/// however the only operation required by this API is the ability to set a specific value.
///
/// - parameters:
/// - value: Value to record.
@inlinable