-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add metrics tracking number of recently loaded crates/versions/platforms #1019
Conversation
1402fc6
to
d06c73e
Compare
We already run high at about 5 GB in prod. I find it hard to think the number of crate/version/platform pairs would take up anything close to that, do you have a guesstimate for 'lot of small strings'? |
I think we can avoid the problem with strings by not storing them at all. My understanding is we don't care about the crate names/versions, so we can just store
|
This comment has been minimized.
This comment has been minimized.
a379c08
to
bb75349
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't look too closely, but the idea seems right. Might review again later.
Other than Joshua's comments, this looks good to me! |
Looks good to me after a rebase :) |
6ef4f1f
to
b3efada
Compare
5bee3a0
to
22ae1da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased, some minor conflicts but I've identified the only major conflict below, both this and master
had started tracking the target
when extracting that from the URL but this wants it without trailing /
.
String::new() | ||
} else { | ||
format!("{}/", target) | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this target
handling was the only major conflict.
These metrics are intended to be useful for evaluating changes for #1004. Knowing how many different crates get accessed over short timespans could help us know things like the potential memory cost of keeping cached indexes around short term.
I'm not sure what the performance impact of these might be in production. The most likely issue would be a large memory usage if the number of different platforms requested per-hour is very high, leading to a lot of small strings kept around to track these.
(based on #1017, so to review the lockfile changes look at the last commit in isolation)