cargo-information icon indicating copy to clipboard operation
cargo-information copied to clipboard

Report crates.io metrics?

Open epage opened this issue 2 years ago • 4 comments

cargo-info includes a lot of different metrics exposed via the crates.io API (so separate from the Index and Cargo.toml)

Looking at the list, some that might be useful include

  • recent download count (popularity)
  • last updated (give a feel for how active development is)

Unsure how we should handle third-party registries.

epage avatar Nov 16 '23 01:11 epage

Unsure how we should handle third-party registries.

  1. Can we have some features only for creats.io?
  2. What about the rate limitation? crates.io has very strict rate limits for those APIs.

0xPoe avatar Nov 21 '23 02:11 0xPoe

Can we have some features only for creats.io?

I wonder if we can rely on the status code if a registry doesn't support it. We could then document it and note that it is optional.

What about the rate limitation? crates.io has very strict rate limits for those APIs.

We'd likely need to hear from crates.io people for insight on user workflows mixed with rate limits. If nothing else, if we get rate limited, I'm assuming there is a relevant status code and we can skip it with a warning?

epage avatar Nov 21 '23 02:11 epage

I discussed it with the crates.io team last night, they thought it is OK to use the /api/v1/crates/:crate_id/:version API to get the download and update information. It wouldn't cause too much pressure on crates.io.

0xPoe avatar Jan 06 '24 08:01 0xPoe

I am working on this.

0xPoe avatar Apr 06 '24 08:04 0xPoe