nodejs / build

Better build and test infra for Node.
506 stars 167 forks source link

Public nodejs.org download metrics outdated? #3972

Open Lehoczky opened 6 days ago

Lehoczky commented 6 days ago

Hi there 👋

I'm coming from https://nodejs.org/metrics/, where navigating to the "current" metrics page seems to only show data until 2024-05-02. Is there a place where more up to data is available?

There is also a link to setup/www/tools/metrics at the end of the page for the scripts used to generate the data, which has been moved since, and I believe the correct URL would be https://github.com/nodejs/build/tree/main/ansible/www-standalone/tools/metrics, but I'm not 100% sure.

I've seen the following discussion, but the issue still seems to be present: https://github.com/nodejs/nodejs.org/issues/6822

richardlau commented 6 days ago

The data is up to date, but the index page isn't -- my suspicion is that the data the index generator gets is paginated and the generator doesn't account for it. https://github.com/mcollina/nodejs-download-stats/ (the source for https://nodedownloads.nodeland.dev/), for example, is showing up to date metrics by looping over https://storage.googleapis.com/access-logs-summaries-nodejs/ until the NextMarker field in the returned data is empty: https://github.com/mcollina/nodejs-download-stats/blob/c883fc08859dd95b9db380edb86ae02c49f9b290/routes/metrics.js#L46-L71

https://github.com/nodejs/build/tree/main/ansible/www-standalone/tools/metrics is outdated. The current metrics generated using the code in https://github.com/nodejs/build/tree/main/ansible/roles/metrics.