measure
fun <T : Any> measure(name: String, plan: PerformancePlan = PerformancePlan(), diagnosticsOwner: Any? = null, beforeSample: (Int) -> Unit = {}, afterSample: (Int) -> Unit = {}, afterOperation: (Int, T) -> Unit = { _, _ -> }, operation: (Int) -> T): PerformanceSample<T>(source)
Runs warm-up, successful samples, and optional actual UI diagnostics on the caller's owner thread. Only the operation belongs to the timed interval; monitoring and serialization are separate. The last result is transferred to the caller and no earlier application result is retained.