Refactor part of queue_manger.go by creating struct to reuse some common function#17441
Merged
bwplotka merged 3 commits intoprometheus:mainfrom Nov 13, 2025
Merged
Conversation
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Contributor
Author
|
Running some benchmark using the commands: go test -bench=BenchmarkBuildTimeSeries github.com/prometheus/prometheus/storage/remote -benchmem -count=5 On main branch: On this branch: Running benchstat to compare: So I think the performance is the same, which is good |
bwplotka
reviewed
Nov 3, 2025
bwplotka
approved these changes
Nov 13, 2025
Member
bwplotka
left a comment
There was a problem hiding this comment.
Great, thanks!
BTW you benchmarks like don't test the path of dropping samples, but that's fine. I don't see anything too bad in the code.
thampiotr
reviewed
Mar 2, 2026
| s.qm.metrics.exemplarsTotal.Add(float64(exemplarCount)) | ||
| s.qm.metrics.histogramsTotal.Add(float64(histogramCount)) | ||
| s.qm.metrics.metadataTotal.Add(float64(metadataCount)) | ||
| metricsUpdater.recordBatchAttempt(sc, begin) |
Contributor
There was a problem hiding this comment.
Because this is called before Store, won't the sentBatchDuration that this updates be incorrect?
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.

Which issue(s) does the PR fix:
Does this PR introduce a user-facing change?