fixing typos
motivation: documentation cleanup changes: fix various typos in method documentation
This commit is contained in:
parent
a5aa28873c
commit
b24e6b2fb3
|
|
@ -12,12 +12,12 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
/// This is the Counter protocol a metrics library implements
|
/// This is the Counter protocol a metrics library implements. It must have reference semantics
|
||||||
public protocol CounterHandler: AnyObject {
|
public protocol CounterHandler: AnyObject {
|
||||||
func increment<DataType: BinaryInteger>(_ value: DataType)
|
func increment<DataType: BinaryInteger>(_ value: DataType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the user facing Counter API. It must have reference semantics, and its behviour depend ons the `CounterHandler` implementation
|
// This is the user facing Counter API. Its behavior depends on the `CounterHandler` implementation
|
||||||
public class Counter: CounterHandler {
|
public class Counter: CounterHandler {
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
var handler: CounterHandler
|
var handler: CounterHandler
|
||||||
|
|
@ -50,13 +50,13 @@ public extension Counter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This is the Recorder protocol a metrics library implements
|
/// This is the Recorder protocol a metrics library implements. It must have reference semantics
|
||||||
public protocol RecorderHandler: AnyObject {
|
public protocol RecorderHandler: AnyObject {
|
||||||
func record<DataType: BinaryInteger>(_ value: DataType)
|
func record<DataType: BinaryInteger>(_ value: DataType)
|
||||||
func record<DataType: BinaryFloatingPoint>(_ value: DataType)
|
func record<DataType: BinaryFloatingPoint>(_ value: DataType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the user facing Recorder API. It must have reference semantics, and its behviour depend ons the `RecorderHandler` implementation
|
// This is the user facing Recorder API. Its behavior depends on the `RecorderHandler` implementation
|
||||||
public class Recorder: RecorderHandler {
|
public class Recorder: RecorderHandler {
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
var handler: RecorderHandler
|
var handler: RecorderHandler
|
||||||
|
|
@ -98,12 +98,12 @@ public class Gauge: Recorder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the Timer protocol a metrics library implements
|
// This is the Timer protocol a metrics library implements. It must have reference semantics
|
||||||
public protocol TimerHandler: AnyObject {
|
public protocol TimerHandler: AnyObject {
|
||||||
func recordNanoseconds(_ duration: Int64)
|
func recordNanoseconds(_ duration: Int64)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the user facing Timer API. It must have reference semantics, and its behviour depend ons the `RecorderHandler` implementation
|
// This is the user facing Timer API. Its behavior depends on the `RecorderHandler` implementation
|
||||||
public class Timer: TimerHandler {
|
public class Timer: TimerHandler {
|
||||||
@usableFromInline
|
@usableFromInline
|
||||||
var handler: TimerHandler
|
var handler: TimerHandler
|
||||||
|
|
@ -167,7 +167,7 @@ public protocol MetricsFactory {
|
||||||
func makeTimer(label: String, dimensions: [(String, String)]) -> TimerHandler
|
func makeTimer(label: String, dimensions: [(String, String)]) -> TimerHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the metrics system itself, it's mostly used set the type of the `MetricsFactory` implementation.
|
// This is the metrics system itself, it's mostly used set the type of the `MetricsFactory` implementation
|
||||||
public enum MetricsSystem {
|
public enum MetricsSystem {
|
||||||
fileprivate static let lock = ReadWriteLock()
|
fileprivate static let lock = ReadWriteLock()
|
||||||
fileprivate static var _factory: MetricsFactory = NOOPMetricsHandler.instance
|
fileprivate static var _factory: MetricsFactory = NOOPMetricsHandler.instance
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue