Skip to content
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

new: extend SEND_X and SENDTO_X #2221

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Jan 2, 2025

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This PR is part of #2068. Besides extending the exit events, SEND_X now also exports the socktuple. Moreover, the PR also adds scap files conversion tests for events related to the accept syscall.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Contributor

poiana commented Jan 2, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ekoops
Once this PR has been reviewed and has the lgtm label, please assign fededp for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

github-actions bot commented Jan 2, 2025

Perf diff from master - unit tests

     1.88%     +1.73%  [.] scap_event_decode_params
    11.69%     +1.41%  [.] sinsp::next
     5.35%     +0.66%  [.] next_event_from_file
     0.43%     +0.59%  [.] scap_event_has_large_payload
     2.91%     +0.54%  [.] sinsp_thread_manager::get_thread_ref
     1.05%     +0.41%  [.] sinsp_parser::event_cleanup
     1.24%     -0.40%  [.] sinsp_evt::get_direction
     0.94%     -0.38%  [.] sinsp_fdtable::find
     2.49%     -0.33%  [.] is_conversion_needed
     0.95%     -0.33%  [.] libsinsp::events::is_unknown_event

Heap diff from master - unit tests

peak heap memory consumption: -5.21K
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: -364B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0333         +0.0333           145           150           145           150
BM_sinsp_split_median                                          +0.0389         +0.0389           145           151           145           151
BM_sinsp_split_stddev                                          -0.0097         -0.0095             1             1             1             1
BM_sinsp_split_cv                                              -0.0417         -0.0414             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0616         -0.0617            62            58            62            58
BM_sinsp_concatenate_paths_relative_path_median                -0.0617         -0.0617            62            58            62            58
BM_sinsp_concatenate_paths_relative_path_stddev                -0.4119         -0.4111             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.3733         -0.3724             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0020         +0.0020            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   +0.0014         +0.0013            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.8301         +0.8284             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.8263         +0.8249             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0976         -0.0977            61            55            61            55
BM_sinsp_concatenate_paths_absolute_path_median                -0.0944         -0.0945            61            55            61            55
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.8430         -0.8432             1             0             1             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.8260         -0.8262             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0198         +0.0197           390           398           390           398
BM_sinsp_split_container_image_median                          +0.0189         +0.0188           391           398           391           398
BM_sinsp_split_container_image_stddev                          -0.3874         -0.3879             3             2             3             2
BM_sinsp_split_container_image_cv                              -0.3993         -0.3998             0             0             0             0

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.60%. Comparing base (63f9cfb) to head (96bd93d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2221      +/-   ##
==========================================
+ Coverage   75.44%   75.60%   +0.15%     
==========================================
  Files         265      267       +2     
  Lines       34057    34156      +99     
  Branches     5801     5797       -4     
==========================================
+ Hits        25695    25822     +127     
+ Misses       8362     8334      -28     
Flag Coverage Δ
libsinsp 75.60% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ekoops ekoops force-pushed the ekoops/convert-send branch from be1b6cc to beabd39 Compare January 3, 2025 14:56
@leogr leogr added this to the 0.21.0 milestone Jan 7, 2025
@ekoops ekoops force-pushed the ekoops/convert-send branch 2 times, most recently from 80adb6f to a0bdde4 Compare January 7, 2025 13:25
@ekoops ekoops force-pushed the ekoops/convert-send branch from a0bdde4 to 96bd93d Compare January 7, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants