feat(agent): tune bucket ranges for download performance histograms#600
Merged
Conversation
sambhav-jain-16
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When emiting latency and throughput metrics for its torrent downloads, the agent tags them by the size category of the blob. This allows us to then query latency/throughput performance for a specific blob size category if we'd like. This PR changes the boundaries of these buckets to gain more actionable data from the metrics.
Before this PR, the smallest category was
xsmall- 0B-100MiB. I am adding a0B-5MiBcategory and merging the1GiB-2GiBand2GiB-5GiBcategories together. The reason is that there are a lot of blobs <5MiB (mostly image manifests) and I'd like to get metrics specifically isolated for them, as the overhead of starting a P2P download is more significant on a <1MiB blob compared to a 1GiB blob.After looking at the other buckets, I decided there's no real reason to keep metrics on 1-2GB blobs separate from 2-5GB blobs, so I decided to merge those buckets for simplicity and to reduce metric ingestion/cardinality rates.