TimingDistributionMetricType
extension TimingDistributionMetricType
-
Convenience method to simplify measuring a function or block of code
Declaration
Swift
public func measure<U>(funcToMeasure: () -> U) -> U
Parameters
funcToMeasure
Accepts a function or closure to measure that can return a value
-
Convenience method to simplify measuring a function or block of code
If the measured function throws, the measurement is canceled and the exception rethrown.
Declaration
Swift
public func measure<U>(funcToMeasure: () throws -> U) throws -> U
Parameters
funcToMeasure
Accepts a function or closure to measure that can return a value