(
timings: &mut Vec<PhaseTiming>,
name: impl Into<String>,
fut: Fut,
)
| 390 | } |
| 391 | |
| 392 | async fn time_async<T, Fut>( |
| 393 | timings: &mut Vec<PhaseTiming>, |
| 394 | name: impl Into<String>, |
| 395 | fut: Fut, |
| 396 | ) -> Result<T> |
| 397 | where |
| 398 | Fut: Future<Output = Result<T>>, |
| 399 | { |
| 400 | let name = name.into(); |
| 401 | let started = Instant::now(); |
| 402 | let result = fut.await; |
| 403 | timings.push(PhaseTiming { |
| 404 | name, |
| 405 | ms: elapsed_ms(started), |
| 406 | }); |
| 407 | result |
| 408 | } |
| 409 | |
| 410 | async fn measure_iterations<F, Fut>( |
| 411 | label: &str, |
no test coverage detected