-
Notifications
You must be signed in to change notification settings - Fork 3.6k
refactor(stringlabels): Support stringlabels in chunkenc #17263
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
Draft
jeschkies
wants to merge
7
commits into
grafana:main
Choose a base branch
from
jeschkies:karsten/stringlabels-chunkenc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
TODO:
|
jeschkies
commented
Apr 17, 2025
} | ||
|
||
func (b *BufferedLabelsBuilder) Add(label labels.Label) { | ||
b.buf = append(b.buf, label) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason this shows up in allocations. Even though there should be none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
› benchstat before.log after.log
goos: linux
goarch: amd64
pkg: github.com/grafana/loki/v3/pkg/chunkenc
cpu: AMD Ryzen 7 3700X 8-Core Processor
│ before.log │ after.log │
│ sec/op │ sec/op vs base │
BackwardIterator/66_kB-16 17.97m ± 6% 18.23m ± 3% +1.43% (p=0.007 n=10)
BackwardIterator/262_kB-16 15.83m ± 0% 15.84m ± 0% ~ (p=0.796 n=10)
BackwardIterator/524_kB-16 12.96m ± 0% 12.75m ± 4% -1.67% (p=0.003 n=10)
geomean 15.45m 15.44m -0.06%
│ before.log │ after.log │
│ B/op │ B/op vs base │
BackwardIterator/66_kB-16 1.197Mi ± 1% 1.200Mi ± 0% ~ (p=0.247 n=10)
BackwardIterator/262_kB-16 361.6Ki ± 2% 358.2Ki ± 1% ~ (p=0.315 n=10)
BackwardIterator/524_kB-16 140.3Ki ± 2% 139.5Ki ± 1% ~ (p=0.247 n=10)
geomean 396.2Ki 394.5Ki -0.43%
│ before.log │ after.log │
│ allocs/op │ allocs/op vs base │
BackwardIterator/66_kB-16 2.764k ± 0% 2.764k ± 0% 0.00% (p=0.010 n=10)
BackwardIterator/262_kB-16 616.0 ± 0% 618.0 ± 0% +0.32% (p=0.000 n=10)
BackwardIterator/524_kB-16 255.0 ± 0% 255.0 ± 0% ~ (p=0.211 n=10)
geomean 757.2 758.0 +0.11%
resolved.
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.
What this PR does / why we need it:
This is a next step of support Prometheus
stringlabels
implementation in Loki. It adds support in thechunkenc
package.Special notes for your reviewer:
The tests should compile with build tag
stringlabels
.Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
deprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR