pub async fn wait_for_metrics( context: &Context, predicate: impl FnMut(&Metrics) -> bool, )
Polls context metrics until predicate returns true.
predicate