-
Notifications
You must be signed in to change notification settings - Fork 467
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
Add experimental support for re2 #2138
Conversation
@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
@blotus: There are no area labels on this PR. You can add as many areas as you see fit.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
/kind feature |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #2138 +/- ##
==========================================
+ Coverage 52.90% 55.65% +2.75%
==========================================
Files 177 124 -53
Lines 24860 16248 -8612
==========================================
- Hits 13151 9043 -4108
+ Misses 10234 6289 -3945
+ Partials 1475 916 -559
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 54 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/area agent |
Oneshot speed(note: all tests are in one-shot mode, so account far agent startup and shutdown)
conclusion: RE2 is significantly faster, even when accounting the slower startup. re2 startup takes >5s, with >4s used during the compilation of default grok patterns, while master takes ~1s to start. Memory usage at restnote: service started w/ the nginx collection without http-bad-user-agent
conclusion: re2 uses twice as much memory at rest. it is specified in re2 doc that compiled expressions are significantly more expensive memory-wise. |
…its WASM runtime which significantly increase startup time
Let's merge w/ WASM for now, and switch to CGO once we've updated package build pipelines, |
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
This PR adds support (behind a feature flag) for using re2 instead of the default golang regexp package for GROK patterns and the
RegexpInFile
helper.The feature flags are:
Early benchmarks show: