Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Perf diff from master - unit testsHeap diff from master - unit testsHeap diff from master - scap fileBenchmarks diff from master |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2222 +/- ##
==========================================
+ Coverage 75.06% 75.10% +0.04%
==========================================
Files 267 276 +9
Lines 34259 34390 +131
Branches 5930 5930
==========================================
+ Hits 25715 25830 +115
- Misses 8544 8560 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4aa6d10 to
aecb8af
Compare
|
/milestone 0.20.0 |
|
LGTM, just a minor comment |
|
would also be nice to add a couple tests, since this patch is lowering coverage for libsinsp |
|
It seems a little bit too hard to add tests around it; i don't even know where i could start. I mean, of course i could create an inspector, add a sinsp_observer, create an event and check that my observer gets called; is this what you mean? |
|
Yes, I believe you can simply add a test based on the usual |
|
Yep i'll do it! |
…ine during parsing. Instead, push them onto a queue owned by the inspector to be later called, 1 by 1, as requested. This ensures that the whole libsinsp state has been processed, even by plugins, before sinsp_observer methods are called. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…program_hashscript` fields from threadinfo. They are unused and can be eventually directly implemented by consumers, if needed. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
aecb8af to
6ba4e77
Compare
|
@LucaGuerra pushed a small test file! |
|
/cc @jasondellaluce |
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Moreover, improved sinsp_observer tests. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
|
/unhold |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
The PR contains 2 distinct commits:
sinsp_observermethods once all parsers (plugins too!) processed the event; in this way, we can be sure that libsinsp state has been fully processed and is consistentm_program_hashandm_program_hash_scripts, and theircompute_program_hashmethod. They were completely unused and their implementation can be eventually offloaded to libs consumers (by either attaching aparseplugin or using thesinsp_observer.IMHO in the future
sinsp_observerclass should go away and consumers should rely upon parse plugins.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: