measureSeconds

inline fun <T> DoubleHistogram.measureSeconds(attributes: Attributes = emptyAttributes(), context: Context? = null, block: () -> T): T

Measure how long block takes to execute and record the duration in seconds using millisecond precision.

Parameters

attributes

attributes to associate with this measurement

context

(Optional) trace context to associate with this measurement

block

the code to execute and return a result from