-
Notifications
You must be signed in to change notification settings - Fork 171
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
fix(libsinsp): add function to set compiler filter and filter string #1976
fix(libsinsp): add function to set compiler filter and filter string #1976
Conversation
21a39c2
to
23185fe
Compare
23185fe
to
668213e
Compare
Perf diff from master - unit tests
Perf diff from master - scap file
Heap diff from master - unit tests
Heap diff from master - scap file
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1976 +/- ##
==========================================
- Coverage 50.99% 50.99% -0.01%
==========================================
Files 310 310
Lines 39607 39608 +1
Branches 17533 17242 -291
==========================================
- Hits 20199 20198 -1
+ Misses 14336 14320 -16
- Partials 5072 5090 +18 ☔ View full report in Codecov by Sentry. |
/milestone 0.18.0 |
Signed-off-by: Roberto Scolaro <[email protected]>
Signed-off-by: Roberto Scolaro <[email protected]>
668213e
to
f5c20e4
Compare
Perf diff from master - unit tests
Perf diff from master - scap file
Heap diff from master - unit tests
Heap diff from master - scap file
|
userspace/libsinsp/sinsp.cpp
Outdated
@@ -1661,7 +1661,7 @@ void sinsp::start_dropping_mode(uint32_t sampling_ratio) | |||
} | |||
#endif // _WIN32 | |||
|
|||
void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter) | |||
void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter, const std::optional<std::string>& filterstring) |
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.
void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter, const std::optional<std::string>& filterstring) | |
void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter, const std::string& filterstring = "") |
I think the previous suggestion was referring to something like this -- otherwise it'd become a breaking change for whoever uses this method.
Signed-off-by: Roberto Scolaro <[email protected]>
Perf diff from master - unit tests
Perf diff from master - scap file
Heap diff from master - unit tests
Heap diff from master - scap file
|
LGTM label has been added. Git tree hash: 7b9e038461122e9cf2988a7a017491405c64d445
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, therealbobo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
Does this PR require a change in the driver versions?
What this PR does / why we need it:
When setting the compiled filter through
set_filter
, we lose the filter string information and never populate them_filterstring
. This adds a method to set them both.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: