feat: add metrics for chunk transform/detransform latency - #401
Draft
jeqo wants to merge 1 commit into
Draft
Conversation
jeqo
force-pushed
the
jeqo/metrics-chunk-processing
branch
from
September 27, 2023 13:13
870791a to
8d83fd1
Compare
ivanyu
reviewed
Sep 28, 2023
jeqo
force-pushed
the
jeqo/metrics-chunk-processing
branch
from
September 28, 2023 08:54
8d83fd1 to
56f35b6
Compare
ivanyu
requested changes
Sep 28, 2023
|
|
||
| import org.apache.kafka.common.utils.Time; | ||
|
|
||
| public class MeteredInputStream extends InputStream { |
Contributor
There was a problem hiding this comment.
There's a problem with this implementation: direct inheritance from InputStream and overriding only read() will result in other read methods being implemented through read(), which is very inefficient, because it's by-byte.
I looked at this problem some time ago and here's my draft: https://github.com/Aiven-Open/tiered-storage-for-apache-kafka/tree/ivanyu/time-to-first-byte. Using FilterInputStream allows to override fewer methods.
Contributor
Author
There was a problem hiding this comment.
Thanks for the pointer! Yes, at the end other implementations use the read method, but as you mentioned it could be inefficient. Will revisit this then.
jeqo
force-pushed
the
jeqo/metrics-chunk-processing
branch
from
September 28, 2023 09:29
56f35b6 to
139d7a3
Compare
jeqo
marked this pull request as draft
September 28, 2023 09:33
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.
Depends on #400