-
Notifications
You must be signed in to change notification settings - Fork 83
Clps + ls prototype draft #1653
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
davidlion
wants to merge
49
commits into
y-scope:main
Choose a base branch
from
davidlion:clpsls-prototype
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.
Draft
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
1bf8e5c
Squash starting code. Compression + search run, but search always dis…
davidlion 457052b
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 8e10d94
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion eacfaed
Initial code for reading plain text files. Need change type of ls par…
davidlion 92b6134
Convert FullMatch and LogType to VarStringT for search.
davidlion d511a22
Add capture group support. Support LogType pure-wildcard search. Weir…
davidlion 48fc474
Remove some debug logs.
davidlion 7a1fbdd
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 922bc67
Drop FullMatch type as it is unnecessary.
davidlion 9300edc
Use DictionaryFloat to work around float conversion; Small refactors.
davidlion 8d4c317
Added FormattedFloat using stod.
davidlion 5e0bdda
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 7dff61f
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 1c0e50b
Remove cmake/Modules/FindLibArchive.cmake due to conflict with task v…
davidlion 591a457
Fix error code linking issue in indexer.
davidlion 44adcb2
Bump libarchive.
davidlion aac0bea
Update log surgeon with in-progress PR of Token refactor for bug fixes.
davidlion c66ca59
Add experimental cli arg with printing placeholders.
davidlion 98a6443
Random tweak.
davidlion d979fc4
Refactor argument passing and log surgeon parser creation.
davidlion b2d941c
Switch back to log surgeon main.
davidlion bf58b50
feat: Add logtype and variable stats tracking and compressing/decompr…
davidlion 150123f
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion d355b8b
Fix newline in clpsls debug logs.
davidlion b9d67aa
Fix type typo.
davidlion da1ff34
Refactor the creation of an output handler and use it with experiment…
davidlion edb5376
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion f4d1779
Call flush on output_handler.
davidlion c4397c0
namespace fix
davidlion 7296e0a
Improve experimental flag handling.
davidlion d1dc63c
Refactor experimental stats to be in a separate file inside an archive.
davidlion 437b2ce
Update cli args before validating.
davidlion b9a58d6
Remove dead code for a feature that will be added separately later.
davidlion 016c3bf
Fix non-experimental path to correctly use ClpStrings again.
davidlion 7c75d79
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 0fc78fa
Add functionality to Array to fix possible holes/gaps between var dic…
davidlion 5626d3c
Add TypedVar to QueryRunner initialize_reader.
davidlion 8e4a36a
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion b3fd4c0
Revert dep changes to build.
davidlion 0bdb9cf
Revert some other changes.
davidlion 0a1ae76
Small linting fix.
davidlion 6c5fc8b
Revert unnecessary change to clean up diff.
davidlion fec1cb0
Refactor archive experimental option handling; unit tests passing.
davidlion 1254976
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 92fa397
Remove TypedVar and add stat helpers to ArchiveWrtier.
davidlion e2e7765
Remove unused get_stats from ColumnReader.
davidlion a97404b
Set prototype NodeType IDs to be large avoiding any conflicts with as…
davidlion c35dcd9
Remove unused enocded logtype id from LogTypeColumn{Reader,Writer}.
davidlion f2bc72f
Merge remote-tracking branch 'upstream/main' into clpsls-prototype
davidlion 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
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| #include "ArchiveStats.hpp" | ||
|
|
||
| #include <cstddef> | ||
|
|
||
| #include <ystdlib/error_handling/Result.hpp> | ||
|
|
||
| #include <clp_s/ErrorCode.hpp> | ||
| #include <clp_s/ZstdCompressor.hpp> | ||
| #include <clp_s/ZstdDecompressor.hpp> | ||
|
|
||
| namespace clp_s { | ||
| auto LogTypeStat::compress(ZstdCompressor& compressor) const | ||
| -> ystdlib::error_handling::Result<void> { | ||
| compressor.write_numeric_value(m_count); | ||
| return ystdlib::error_handling::success(); | ||
| } | ||
|
|
||
| auto LogTypeStat::decompress(ZstdDecompressor& decompressor) | ||
| -> ystdlib::error_handling::Result<LogTypeStat> { | ||
| LogTypeStat stat{}; | ||
| if (ErrorCodeSuccess != decompressor.try_read_numeric_value(stat.m_count)) { | ||
| return ClpsErrorCode{ClpsErrorCodeEnum::Failure}; | ||
| } | ||
| return stat; | ||
| } | ||
|
|
||
| auto VariableStat::compress(ZstdCompressor& compressor) const | ||
| -> ystdlib::error_handling::Result<void> { | ||
| compressor.write_numeric_value(m_count); | ||
| compressor.write_numeric_value(m_type.size()); | ||
| compressor.write_string(m_type); | ||
| return ystdlib::error_handling::success(); | ||
| } | ||
|
|
||
| auto VariableStat::decompress(ZstdDecompressor& decompressor) | ||
| -> ystdlib::error_handling::Result<VariableStat> { | ||
| VariableStat stat{}; | ||
| if (ErrorCodeSuccess != decompressor.try_read_numeric_value(stat.m_count)) { | ||
| return ClpsErrorCode{ClpsErrorCodeEnum::Failure}; | ||
| } | ||
|
|
||
| size_t type_size{}; | ||
| if (ErrorCodeSuccess != decompressor.try_read_numeric_value(type_size)) { | ||
| return ClpsErrorCode{ClpsErrorCodeEnum::Failure}; | ||
| } | ||
| if (ErrorCodeSuccess != decompressor.try_read_string(type_size, stat.m_type)) { | ||
| return ClpsErrorCode{ClpsErrorCodeEnum::Failure}; | ||
| } | ||
| return stat; | ||
| } | ||
| } // namespace clp_s |
Oops, something went wrong.
Oops, something went wrong.
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.
A new variable placeholder is added here, but it seems like
is_variable_placeholderinclp/ir/parsing.hpphasn't been updated to include the placeholder. This means that the escaping code won't end up properly escaping0x14when it appears in logtext, which is a bug.Granted, if we do properly escape it then this constitutes a major breaking format change that isn't guarded by the experimental flag. Given that, it might actually be better to intentionally leave this bug for now to avoid the breaking format change. The only alternative I can think of is guarding everything related to
VariablePlacehodler::Schemaby a bunch of compile time macros, but then we would need to ship a separate build for this experimental change.