Skip to content

fix builder documentation_size metric, improve build_time - #3533

Merged
GuillaumeGomez merged 3 commits into
rust-lang:mainfrom
syphar:fix-doc-stats
Sep 17, 2026
Merged

GuillaumeGomez merged 3 commits into
rust-lang:mainfrom
syphar:fix-doc-stats

Conversation

@syphar

@syphar syphar commented Sep 17, 2026

Copy link
Copy Markdown
Member

Looking at datadog, I realized the documentation-size is broken:
image

Some digging shows that is since #3009 / 2682ed4 (november 2025!), where we started using buckets defined as MiB, where we still reported bytes... :(

To fix that, I first switched

  • ArchiveStatistics to use ByteSize, same as
  • finish_release and finish_build

So it's clearer what is reported, and the decision how to store is done in docs_rs_database.

DOCUMENTATION_SIZE_BUCKETS are also now defined with ByteSize, and reporting the documentation_size is only done via a small helper method (taking ByteSize of course). That should make mistakes much harder in this area. I fixed the metric unit to what the opentelemetry semantic conventions define.

The crate_details we fetch for our web handlers now also use ByteSize for explicitness.

While I was on it, I did the same for the build_time metric.

@syphar syphar self-assigned this Sep 17, 2026
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Sep 17, 2026
@syphar syphar changed the title fix builder documentation_size metric fix builder documentation_size metric, improve build_Time Sep 17, 2026
@syphar syphar changed the title fix builder documentation_size metric, improve build_Time fix builder documentation_size metric, improve build_time Sep 17, 2026
@syphar
syphar marked this pull request as ready for review September 17, 2026 13:35
@syphar
syphar requested a review from a team as a code owner September 17, 2026 13:35
@syphar

syphar commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

r? @GuillaumeGomez

@rustbot rustbot assigned GuillaumeGomez and unassigned syphar Sep 17, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member

Nice, thanks! I'm sure there is a way to init the const slices without having to write all values by hand but don't have time to think about it right now. Maybe later. =D

@GuillaumeGomez
GuillaumeGomez merged commit 64577cc into rust-lang:main Sep 17, 2026
11 checks passed
@GuillaumeGomez
GuillaumeGomez deleted the fix-doc-stats branch September 17, 2026 13:41
@github-actions github-actions Bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants