-
Notifications
You must be signed in to change notification settings - Fork 6
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 support for log-level filtering of structured IR streams. #35
Merged
+511
−264
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
1a3da51
add new class
davemarco 29a87d2
fix-lint
davemarco e5a8e4c
fix lint
davemarco 921c322
small change
davemarco 865e41d
small change
davemarco 0234365
fix lint
davemarco 0c86cf4
Update src/clp_ffi_js/ir/LogEventWithFilterData.hpp
davemarco 84037cf
fix lint
davemarco ef1ff5d
fix lint
davemarco cdcad94
fix lint
davemarco a1e9142
fix lint
davemarco 2738dd5
first draft
davemarco d4afd35
add missing filtering
davemarco 3f32f91
fix lint
davemarco 01ef415
add support for int
davemarco de5aaf5
add new functions
davemarco 67f43f0
cleanup
davemarco be0e5ba
lint
davemarco 8e8c648
add files
davemarco f2907f4
changes
davemarco a1b776f
fix filter
davemarco a199924
Merge branch 'main' into sFilter
davemarco d00d0a2
change version
davemarco e9ed45d
fix lint
davemarco 72029f1
small change
davemarco c757571
junhao review
davemarco 4975f79
fix lint
davemarco 7346715
fix lint
davemarco 04a8d1f
junhao changes
davemarco 2a202b8
add missing code in structured reader
davemarco 5332e9b
add template for decode
davemarco da6350f
lint
davemarco ee2eb42
fix lint
davemarco 90b977f
reword some comments
davemarco 8cc73d0
junhao review
davemarco 4d905e8
remove double declaration
davemarco 5854e36
fix lint
davemarco f3f6e76
move reserve up
davemarco d4467ea
Apply suggestions from code review
davemarco 6660763
add reader option param
davemarco 5b684ab
refactor using lambda
davemarco 9a5a502
small nits
davemarco cce7980
fix lint
davemarco feec5ef
Apply suggestions from code review
davemarco 61e1e83
kirk review
davemarco 907c327
fix lint
davemarco 1da4c7d
fix lint
davemarco f08e07f
Apply suggestions from code review
davemarco aee6422
kirk review
davemarco 0581310
added rerror for invalid range
davemarco 2aabf7b
Update src/clp_ffi_js/ir/StreamReader.hpp
davemarco 2d7e02e
add throws doc strings
davemarco 7d0a2c8
fix
davemarco 88e6d3e
junhao review
davemarco 7df5e26
add mising word
davemarco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add support for int
commit 01ef4154c19369ebe7683833f025711bcd0508b1
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ enum class LogLevel : std::uint8_t { | |
FATAL, | ||
}; | ||
constexpr LogLevel cValidLogLevelsBeginIdx{LogLevel::TRACE}; | ||
constexpr LogLevel cValidLogLevelsEndIdx{LogLevel::FATAL}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indices bounds are non-inclusive, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure i changed |
||
|
||
/** | ||
* Strings corresponding to `LogLevel`. | ||
|
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
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.
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 we add a
Length
as the last item and use it to replacecValidLogLevelsEndIdx
?That way we don't always have to update
cValidLogLevelsEndIdx
if we ever add more log levels.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 was looking at https://github.com/y-scope/clp/blob/f1876cd63a56dd79a6243f6c8b6b6a7fd48348cc/components/core/src/clp/GlobalMySQLMetadataDB.cpp#L22-L23 when i suggested the enum name "length" though I don't see the convention being documented anywhere. If that's a convention, i feel we can omit the comment.
@kirkrodrigues could you confirm the convention?
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 it's a general C/C++ convention to call it length; that said, it's probably not a bad idea to leave a comment because maybe the reader would confuse "SIZE" for a log level.
I also realized that the case of these enum values is wrong. They should be
None
,Trace
, etc. Can we open an issue and fix in another PR?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.
@coderabbitai let's open an issue to correct cases of enum property names as PascalCase
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.
@junhaoliao, I've successfully created the issue to correct the enum property names to PascalCase: Issue #39.
🔗 Analysis chain
@junhaoliao, I've opened an issue to correct the cases of enum property names to PascalCase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 460
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 changed to Length.
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.