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

cleanup(sinsp): remove some duplicated code #2180

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

Andreagit97
Copy link
Member

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?

No

What this PR does / why we need it:

remove some duplicated code

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

github-actions bot commented Dec 3, 2024

Perf diff from master - unit tests

    10.60%     -1.39%  [.] sinsp_parser::reset
     5.27%     -1.17%  [.] sinsp_evt::get_type
     4.60%     -0.93%  [.] sinsp_evt::load_params
     5.37%     -0.91%  [.] next
     0.57%     +0.90%  [.] sinsp_evt::get_direction
     5.66%     +0.80%  [.] sinsp::next
     4.33%     -0.72%  [.] gzfile_read
     3.83%     +0.69%  [.] sinsp_parser::process_event
     0.30%     +0.58%  [.] std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Identity, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >::find
     0.92%     +0.55%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>

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.0169         +0.0169           144           146           144           146
BM_sinsp_split_median                                          +0.0216         +0.0215           143           147           143           147
BM_sinsp_split_stddev                                          -0.3026         -0.3024             2             1             2             1
BM_sinsp_split_cv                                              -0.3142         -0.3140             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0564         +0.0564            57            60            57            60
BM_sinsp_concatenate_paths_relative_path_median                +0.0559         +0.0559            57            60            57            60
BM_sinsp_concatenate_paths_relative_path_stddev                +0.9320         +0.9279             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    +0.8289         +0.8249             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0354         +0.0354            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0315         +0.0315            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +3.8244         +3.8247             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +3.6593         +3.6595             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.1455         +0.1456            56            64            56            64
BM_sinsp_concatenate_paths_absolute_path_median                +0.1420         +0.1420            56            64            56            64
BM_sinsp_concatenate_paths_absolute_path_stddev                +2.5560         +2.5542             0             1             0             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +2.1043         +2.1026             0             0             0             0
BM_sinsp_split_container_image_mean                            -0.0004         -0.0004           387           387           387           387
BM_sinsp_split_container_image_median                          -0.0032         -0.0032           386           385           386           385
BM_sinsp_split_container_image_stddev                          +0.4985         +0.4993             4             5             4             5
BM_sinsp_split_container_image_cv                              +0.4990         +0.4998             0             0             0             0

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.16%. Comparing base (f4a7bb5) to head (68ba4d0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
userspace/libsinsp/sinsp_filtercheck_event.cpp 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2180      +/-   ##
==========================================
- Coverage   75.16%   75.16%   -0.01%     
==========================================
  Files         257      257              
  Lines       33736    33711      -25     
  Branches     5755     5745      -10     
==========================================
- Hits        25359    25338      -21     
+ Misses       8377     8373       -4     
Flag Coverage Δ
libsinsp 75.16% <91.66%> (-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.

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

@poiana
Copy link
Contributor

poiana commented Dec 4, 2024

LGTM label has been added.

Git tree hash: 31f3e93c69df74574d3dd4397065c41944a33dad

@poiana
Copy link
Contributor

poiana commented Dec 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP

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

@poiana poiana merged commit 4286d3c into falcosecurity:master Dec 4, 2024
47 of 49 checks passed
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.

4 participants