Measure

sealed interface Measure

Logging tool to measure the time between events. Use this tool to help decide how to instrument with the Trace.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val name: String

The name of the measure instance.

Functions

Link copied to clipboard
abstract fun elapsedSince(event: String): Duration?

Returns the duration elapsed since a specific event was marked.

Link copied to clipboard
abstract fun log(block: () -> String): Double

Logs the result of a measurement.

Link copied to clipboard
abstract fun mark(event: String, block: () -> String): Double

Marks a specific event in the measurement process.

Link copied to clipboard
open fun start(block: () -> String): Double

Starts a measurement block and records the start time.