Skip to content

Commit cd5f3ec

Browse files
authored
Merge branch 'master' into fix_buckets
2 parents d81dd59 + db5bb3d commit cd5f3ec

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ By default, this should be accessible on your main serving port, at the `/metric
111111
```swift
112112
app.get("metrics") { req -> EventLoopFuture<String> in
113113
let promise = req.eventLoop.makePromise(of: String.self)
114-
try MetricsSystem.prometheus().collect(into: promise)
114+
DispatchQueue.global().async {
115+
do {
116+
try MetricsSystem.prometheus().collect(into: promise)
117+
} catch {
118+
promise.fail(error)
119+
}
120+
}
115121
return promise.futureResult
116122
}
117123
```

Sources/Prometheus/Utils.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import Foundation
22

3-
#if os(iOS) || os(watchOS) || os(tvOS)
4-
import CoreGraphics
5-
#endif
6-
73
/// Empty labels class
84
public struct EmptyLabels: MetricLabels {
95
/// Creates empty labels
@@ -76,8 +72,6 @@ public extension ConvertibleNumberType {
7672
var floatValue: Float { return Float(doubleValue) }
7773
/// Number as an Int
7874
var intValue: Int { return lrint(doubleValue) }
79-
/// Number as a CGFloat
80-
var CGFloatValue: CGFloat { return CGFloat(doubleValue) }
8175
}
8276

8377
/// Double Representable Conformance
@@ -91,8 +85,6 @@ extension FixedWidthInteger {
9185
/// Double Representable Conformance
9286
extension Double: ConvertibleNumberType { public var doubleValue: Double { return self }}
9387
/// Double Representable Conformance
94-
extension CGFloat: ConvertibleNumberType { public var doubleValue: Double { return Double(self) }}
95-
/// Double Representable Conformance
9688
extension Float: ConvertibleNumberType { public var doubleValue: Double { return Double(self) }}
9789
/// Double Representable Conformance
9890
extension Int: ConvertibleNumberType { }

0 commit comments

Comments
 (0)