Skip to content

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Apr 14, 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 a series #2343.
It adds resolve_hostname_and_port parameter to sinsp_threadinfo::fix_sockets_coming_from_proc() and sinsp_thread_manager::fix_sockets_coming_from_proc() signatures.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

feat(userspace/libsinsp)!: move host and port res flag into signature

Add `resolve_hostname_and_port` parameter to
`sinsp_threadinfo::fix_sockets_coming_from_proc()` and
`sinsp_thread_manager::fix_sockets_coming_from_proc()` signatures

BREAKING CHANGE: update
`sinsp_threadinfo::fix_sockets_coming_from_proc()` and
`sinsp_thread_manager::fix_sockets_coming_from_proc()` signatures

Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
Copy link

Perf diff from master - unit tests

     1.97%     -0.43%  [.] sinsp_thread_manager::get_thread_ref
     4.04%     -0.41%  [.] next_event_from_file
     5.64%     +0.38%  [.] sinsp_parser::reset
     0.84%     -0.29%  [.] sinsp_parser::event_cleanup
     5.49%     +0.29%  [.] sinsp_evt::get_type
     1.19%     -0.18%  [.] libsinsp::sinsp_suppress::process_event
     0.96%     +0.18%  [.] scap_event_decode_params
     0.87%     +0.18%  [.] sinsp::fetch_next_event
     0.96%     +0.15%  [.] user_group_updater::user_group_updater
     0.36%     +0.15%  [.] sinsp_evt::get_param

Heap diff from master - unit tests

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

Heap diff from master - scap file

peak heap memory consumption: 0B
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.0120         -0.0119           149           147           149           147
BM_sinsp_split_median                                          -0.0122         -0.0122           149           147           149           147
BM_sinsp_split_stddev                                          +0.9961         +0.9926             0             1             0             1
BM_sinsp_split_cv                                              +1.0203         +1.0166             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0316         +0.0316            58            59            58            59
BM_sinsp_concatenate_paths_relative_path_median                +0.0153         +0.0154            57            58            57            58
BM_sinsp_concatenate_paths_relative_path_stddev                +3.6880         +3.6867             0             2             0             2
BM_sinsp_concatenate_paths_relative_path_cv                    +3.5445         +3.5431             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0084         -0.0083            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0084         -0.0083            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +1.1408         +1.1500             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +1.1589         +1.1681             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0649         +0.0649            59            63            59            63
BM_sinsp_concatenate_paths_absolute_path_median                +0.0418         +0.0418            59            61            59            61
BM_sinsp_concatenate_paths_absolute_path_stddev                +3.6781         +3.6765             1             3             1             3
BM_sinsp_concatenate_paths_absolute_path_cv                    +3.3931         +3.3914             0             0             0             0

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.18%. Comparing base (d45ed9c) to head (e299794).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2344   +/-   ##
=======================================
  Coverage   77.17%   77.18%           
=======================================
  Files         227      227           
  Lines       30192    30197    +5     
  Branches     4607     4610    +3     
=======================================
+ Hits        23302    23307    +5     
  Misses       6890     6890           
Flag Coverage Δ
libsinsp 77.18% <100.00%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@poiana
Copy link
Contributor

poiana commented Apr 14, 2025

LGTM label has been added.

Git tree hash: 5c3d7b116a425496289cea090bd6610d889aeb15

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap Apr 14, 2025
@poiana
Copy link
Contributor

poiana commented Apr 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, FedeDP, Molter73

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@FedeDP
Copy link
Contributor

FedeDP commented Apr 14, 2025

/milestone 0.21.0

@poiana poiana added this to the 0.21.0 milestone Apr 14, 2025
@poiana poiana merged commit f85eca6 into falcosecurity:master Apr 14, 2025
46 of 47 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap Apr 14, 2025
@ekoops ekoops deleted the ekoops/resolve-host-and-port branch April 14, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants