mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Add new option to --disable-telemetry
to disable quickinstall statistics collection (#1831)
* Add new option `--disable-quick-install-stats` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * 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 <Jiahao_XU@outlook.com> * Rename option to `--disable-telemetry` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Update args.rs Co-authored-by: Félix Saparelli <felix@passcod.name> Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update args.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Co-authored-by: Félix Saparelli <felix@passcod.name>
This commit is contained in:
parent
fa105bb8d7
commit
6809601273
6 changed files with 36 additions and 3 deletions
|
@ -9,3 +9,5 @@ pub use binstalk_fetchers as fetchers;
|
|||
pub use binstalk_registry as registry;
|
||||
pub use binstalk_types as manifests;
|
||||
pub use detect_targets::{get_desired_targets, DesiredTargets, TARGET};
|
||||
|
||||
pub use fetchers::QUICK_INSTALL_STATS_URL;
|
||||
|
|
|
@ -55,4 +55,5 @@ pub struct Options {
|
|||
pub registry: Registry,
|
||||
|
||||
pub signature_policy: SignaturePolicy,
|
||||
pub disable_telemetry: bool,
|
||||
}
|
||||
|
|
|
@ -175,8 +175,13 @@ async fn resolve_inner(
|
|||
);
|
||||
}
|
||||
|
||||
if !opts.disable_telemetry {
|
||||
for fetcher in &handles {
|
||||
fetcher.clone().report_to_upstream();
|
||||
}
|
||||
}
|
||||
|
||||
for fetcher in handles {
|
||||
fetcher.clone().report_to_upstream();
|
||||
match AutoAbortJoinHandle::new(fetcher.clone().find())
|
||||
.flattened_join()
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue