Skip to content

Commit b017e02

Browse files
authored
add note about convergence tag (#20)
motivation: starting convergence period for swift-metrics 1.0.0 release changes: * add info in readme about the convergence phase/version * format
1 parent 6db51d5 commit b017e02

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ If you have a server-side Swift application, or maybe a cross-platform (e.g. Lin
1717
To add a dependency on the metrics API package, you need to declare it in your `Package.swift`:
1818

1919
```swift
20-
// it's early days here so we haven't tagged a version yet, but will soon
21-
.package(url: "https://github.com/apple/swift-metrics.git", .branch("master")),
20+
// SwiftMetrics is converging towards the 1.0.0 release as of April 22nd 2019, the tag is 1.0.0-convergence.1
21+
// To depend on this release, you can use
22+
.package(url: "https://github.com/apple/swift-metrics.git", from: "1.0.0-convergence.1"),
2223
```
2324

2425
and to your application/library target, add "Metrics" to your dependencies:
@@ -46,9 +47,9 @@ Note: If you are building a library, you don't need to concern yourself with thi
4647

4748
SwiftMetrics only provides the metrics system API. As an application owner, you need to select a metrics backend (such as the ones mentioned above) to make the metrics information useful.
4849

49-
Selecting a backend is done by adding a dependency on the desired backend client implementation and invoking the `MetricsSystem.bootstrap` function at the beginning of the program:
50+
Selecting a backend is done by adding a dependency on the desired backend client implementation and invoking the `MetricsSystem.bootstrap` function at the beginning of the program:
5051

51-
```swift
52+
```swift
5253
MetricsSystem.bootstrap(SelectedMetricsImplementation())
5354
```
5455

@@ -192,7 +193,7 @@ class SimpleMetricsLibrary: MetricsFactory {
192193
func makeTimer(label: String, dimensions: [(String, String)]) -> TimerHandler {
193194
return ExampleTimer(label, dimensions)
194195
}
195-
196+
196197
// implementation is stateless, so nothing to do on destroy calls
197198
func destroyCounter(_ handler: CounterHandler) {}
198199
func destroyRecorder(_ handler: RecorderHandler) {}

Sources/CoreMetrics/Metrics.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public class Counter {
7878
public func reset() {
7979
self.handler.reset()
8080
}
81-
8281
}
8382

8483
public extension Counter {
@@ -483,7 +482,6 @@ public final class MultiplexMetricsHandler: MetricsFactory {
483482
}
484483
}
485484

486-
487485
private class MuxCounter: CounterHandler {
488486
let counters: [CounterHandler]
489487
public init(factories: [MetricsFactory], label: String, dimensions: [(String, String)]) {
@@ -528,7 +526,6 @@ public final class MultiplexMetricsHandler: MetricsFactory {
528526

529527
/// Ships with the metrics module, used for initial bootstraping.
530528
public final class NOOPMetricsHandler: MetricsFactory, CounterHandler, RecorderHandler, TimerHandler {
531-
532529
public static let instance = NOOPMetricsHandler()
533530

534531
private init() {}
@@ -543,9 +540,9 @@ public final class NOOPMetricsHandler: MetricsFactory, CounterHandler, RecorderH
543540
return self
544541
}
545542

546-
public func destroyCounter(_ handler: CounterHandler) {}
547-
public func destroyRecorder(_ handler: RecorderHandler) {}
548-
public func destroyTimer(_ handler: TimerHandler) {}
543+
public func destroyCounter(_: CounterHandler) {}
544+
public func destroyRecorder(_: RecorderHandler) {}
545+
public func destroyTimer(_: TimerHandler) {}
549546

550547
public func increment(by: Int64) {}
551548
public func reset() {}

0 commit comments

Comments
 (0)