-
Notifications
You must be signed in to change notification settings - Fork 214
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
feat: add metrics for memtable #1036
Merged
Merged
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
4b7f1d1
to
b6d8d42
Compare
e255597
to
b292f91
Compare
ShiKaiWi
reviewed
Jun 27, 2023
e04250a
to
4f08a9e
Compare
ShiKaiWi
approved these changes
Jun 27, 2023
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.
lgtm
dust1
pushed a commit
to dust1/ceresdb
that referenced
this pull request
Aug 9, 2023
## Rationale Current we meet many situations with small SST, in order to debug where the issue is, we need to know memtable's inner state. ## Detailed Changes Add metrics() for MemTable trait, which contains three metrics now: raw_size, encoded_size, row_cnt. ## Test Plan Manually, when memtable flush to level0, logs will contains metrics like ```bash 2023-06-27 16:21:21.994 INFO [analytic_engine/src/instance/flush_compaction.rs:392] Instance flush memtables to output, table:system, table_id:2199023255553, request_id:4074, mems_to_flush:FlushableMemTables { sampling_mem: None, memtables: [MemTableState { time_range: TimeRange { inclusive_start: Timestamp(1687852800000), exclusive_end: Timestamp(1687860000000) }, id: 161, mem: 27262976, metrics: Metrics { row_raw_size: 11160000, row_encoded_size: 21840000, row_count: 120000 }, last_sequence: 3872 }] }, files_to_level0:[AddFile { level: Level(0), file: FileMeta { id: 178, size: 6806645, row_num: 120000, time_range: TimeRange { inclusive_start: Timestamp(1687852800000), exclusive_end: Timestamp(1687860000000) }, max_seq: 3872, storage_format: Columnar } }], flushed_sequence:3872 ``` --------- Co-authored-by: kamille <caoruiqiu.crq@antgroup.com>
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.
Rationale
Current we meet many situations with small SST, in order to debug where the issue is, we need to know memtable's inner state.
Detailed Changes
Add metrics() for MemTable trait, which contains three metrics now: raw_size, encoded_size, row_cnt.
Test Plan
Manually, when memtable flush to level0, logs will contains metrics like