swift-metrics/Tests/MetricsTests
Nathan Harris 8e5110dcd6 Add `Timer.recordNanoseconds` Generic Overload (#28) (#30)
Motivation:

As discussed in Issue #28, there are a few preferred lightweight APIs for getting timestamps such as `DispatchTime` but those APIs return `UInt64` types, which need to be handled for overflow.

Modifications:

Added a generic `BinaryInteger` overload method for `recordNanoseconds` that guards against accidental overflows from `UInt64` to `Int64`

Result:

Users now have access to a new method to record nanosecond measurements with `Timer` that guards against overflows.
2019-05-25 21:36:56 -07:00
..
CoreMetricsTests+XCTest.swift Add guards for Int64 overflow in `Timer` methods (#29) 2019-05-24 22:41:41 -07:00
CoreMetricsTests.swift Add `Timer.recordNanoseconds` Generic Overload (#28) (#30) 2019-05-25 21:36:56 -07:00
MetricsTests+XCTest.swift fix linux tests formatting (#13) 2019-04-12 10:57:04 -07:00
MetricsTests.swift prepare to release (#1) 2019-04-08 18:58:55 -07:00
TestMetrics.swift Introduce metric.destroy() to enable lifecycle management (#17) 2019-04-19 10:33:58 -07:00