From 397af7e45c61abb94a17b00cf7aa59fbfcb6c2a1 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 25 Jul 2024 00:13:44 +1000 Subject: [PATCH] Send quickinstall stats in parallel This commit also make sure'the stats is always sent for each fetcher, regardless of whether it is picked or not, to make sure that the quick-install stats collection gets the full infomration of possible targets. Signed-off-by: Jiahao XU --- crates/binstalk/src/ops/resolve.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/binstalk/src/ops/resolve.rs b/crates/binstalk/src/ops/resolve.rs index 35c5f499..f075db48 100644 --- a/crates/binstalk/src/ops/resolve.rs +++ b/crates/binstalk/src/ops/resolve.rs @@ -175,10 +175,13 @@ async fn resolve_inner( ); } - for fetcher in handles { - if !opts.disable_quick_install_stats { + if !opts.disable_quick_install_stats { + for fetcher in &handles { fetcher.clone().report_to_upstream(); } + } + + for fetcher in handles { match AutoAbortJoinHandle::new(fetcher.clone().find()) .flattened_join() .await