-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Improve logql query statistics collection. #1573
Conversation
benchmark before:
after
This is pretty much similar now ! I had to change a bit the implementation. |
This also add information about ingester queries. Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
57bd751
to
1db3138
Compare
Signed-off-by: Cyril Tovena <[email protected]>
} | ||
|
||
// Log logs a query statistics result. | ||
func Log(log log.Logger, r Result) { |
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.
can you add some comments to these describing what they refer to? I'm having a hard time understandingUncompressed vs Decompressed vs Compressed
. I'm guessing one is before decompression, one is after decompression, and one is after recompression?
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.
- Uncompressed is data that was processed but not compressed from headchunk.
- Decompressed is data that was processed from decompression store or ingester.
- Compressed is data that that was decompressed. but the value before decompression.
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.
I'm happy to change the names, or document it better where would it be better to document this ?
@slim-bean ??
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.
I think if you put your comment in the code as a comment it'd be great.
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.
2 thoughts:
Do we really care that they came out of the head chunk? Should we just add the line and byte count to the decompressed counts?
If we do care, i would suggest naming them:
HeadChunkBytes
HeadChunkLines
Signed-off-by: Cyril Tovena <[email protected]>
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.
This looks great.
Signed-off-by: Cyril Tovena <[email protected]>
This also add information about ingester queries using grpc trailers.
Next step:
Signed-off-by: Cyril Tovena [email protected]