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(libsinsp): remove unreachable code #1972

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

LucaGuerra
Copy link
Contributor

What type of PR is this?

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

/kind cleanup

/area libsinsp

/milestone 0.18.0

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

As per title

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

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 Jul 22, 2024

LGTM label has been added.

Git tree hash: d549342ea48916ffa86dc078702250c15d19454c

Copy link

Perf diff from master - unit tests

     4.70%     -1.46%  [.] sinsp_parser::process_event
    10.60%     -1.27%  [.] sinsp_parser::reset
     3.51%     +1.03%  [.] gzfile_read
     5.18%     -1.03%  [.] next
     3.46%     -0.90%  [.] sinsp_thread_manager::find_thread
     1.24%     +0.76%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     1.41%     -0.73%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::find
     0.48%     +0.64%  [.] sinsp_parser::event_cleanup
     7.67%     -0.61%  [.] sinsp::next
     0.60%     +0.56%  [.] sinsp_utils::find_longest_matching_evt_param

Perf diff from master - scap file

    32.34%    -12.20%  [.] sinsp_evt_formatter::tostring_withformat
     4.05%     +5.58%  [.] gzfile_read
    20.24%     -4.34%  [.] sinsp_filter_check::extract_nocache
     8.08%     -2.09%  [.] sinsp_filter_check::get_field_info
     4.06%     +1.84%  [.] sinsp_filter_check_thread::extract_single
     4.04%     +1.82%  [.] next
     4.03%     -0.35%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     3.49%     -0.10%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>
     3.57%     +0.10%  [.] sinsp_threadinfo::init
     4.05%     -0.10%  [.] 0x00000000000a7fe0

Heap diff from master - unit tests

total runtime: -0.09s.
calls to allocation functions: 785 (-8920/s)
temporary memory allocations: 263 (-2988/s)
peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

total runtime: 0.02s.
calls to allocation functions: 0 (0/s)
temporary memory allocations: -9 (-500/s)
peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.01%. Comparing base (81f451e) to head (7955510).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1972    +/-   ##
========================================
  Coverage   51.00%   51.01%            
========================================
  Files         310      310            
  Lines       39570    39564     -6     
  Branches    17533    17688   +155     
========================================
  Hits        20184    20184            
- Misses      14331    14351    +20     
+ Partials     5055     5029    -26     

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

Copy link
Contributor

@jasondellaluce jasondellaluce 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 Aug 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, jasondellaluce, LucaGuerra

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:
  • OWNERS [FedeDP,LucaGuerra,jasondellaluce]

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 9bda461 into falcosecurity:master Aug 5, 2024
46 checks passed
@LucaGuerra LucaGuerra deleted the cleanup/unreachable-code branch August 6, 2024 07:39
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