measure(label:dimensions:body:)

Convenience for measuring duration of a closure.

Metrics.swift:31
static func measure<T>(label: String, dimensions: [(String, String)] = [], body: @escaping () throws -> T) rethrows -> T

Parameters

label

The label for the Timer.

dimensions

The dimensions for the Timer.

body

Closure to run & record.