-
-
Notifications
You must be signed in to change notification settings - Fork 927
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
Show rank for number of download on gem pages #3658
Comments
Would be nice, so I concur there. We only have to be careful to not make the information too "cluttered". While I think it would be useful and maxime |
I would put it on the right hand side close to where the number of downloads is included. if size is an issue, it could be right under the total number of download, but in a smaller font 10,937,427 downloads |
I was looking into this, but it seems I forgot to post my notes. Let me try to revive those from my psql history and my poor memory. It should be possible to get overall position using following query. SELECT position FROM (
SELECT rubygem_id, row_number() OVER(ORDER BY count DESC) AS position
FROM gem_downloads WHERE version_id = 0 AND rubygem_id <> 0
) AS q WHERE rubygem_id = 123;") This results into query taking 150-250ms at staging. To make it faster, we can cache the inner query somehow (using
Btw. @maximecb I got confused by this. I wrote some queries and I have seen different numbers for |
That's pretty funny 😆 How far was I off with my fictional numbers? ... Excited that you're working on this tho :D |
It seems |
Hi. I'm working on the YJIT project and I was looking at the rubygems.org page for the
chunky_png
gem:https://rubygems.org/gems/chunky_png/versions/1.3.5
I saw that this gem has over 110M downloads, which is more than I expected. However, I was wondering how that number compares to other gems. Would it be possible, on the right hand side of the page for an individual gem, to show the "rank" of the gem. As in, based on the total number of downloads, this gem is 83/63,407. This would give more context on how popular an individual gem is.
For more context on why this might be useful: we have a benchmark for the
chunky_png
gem, and I was wondering how much effort we should spend on making this gem run faster, which is going to be proportional to how popular it is.I realize that not everyone will care about this metric, but it also seems like it could be a relatively easy change to implement, and there is space on the page to display this extra data point :)
The text was updated successfully, but these errors were encountered: