setDuration

suspend fun <T> Gauge.setDuration(block: () -> T): T

Measures the duration of a block and stores it in the unlabeled gauge.

Return

The result of the block.

Parameters

block

The block to execute.


suspend fun <T> Gauge.Child.setDuration(block: () -> T): T

Measures the duration of a block and stores it in the labeled Gauge.Child.

Return

The result of the block.

Parameters

block

The block to execute.