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(tests): add some exceptions in sinsp test framework #2140

Merged
merged 1 commit into from
Nov 5, 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 tests

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

add some exceptions in sinsp test framework

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
Copy link

Perf diff from master - unit tests

     9.97%     -1.44%  [.] sinsp_parser::reset
     1.72%     -0.91%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>
     1.69%     -0.75%  [.] sinsp_parser::parse_context_switch
     1.42%     -0.65%  [.] 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
     4.22%     +0.63%  [.] next
     5.12%     -0.60%  [.] sinsp_parser::process_event
     0.63%     +0.58%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     0.53%     +0.58%  [.] sinsp_evt::get_ts
     2.21%     +0.49%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
     0.36%     +0.44%  [.] sinsp_fdtable::sinsp_fdtable

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.0368         +0.0368           147           153           147           153
BM_sinsp_split_median                                          +0.0373         +0.0373           147           153           147           153
BM_sinsp_split_stddev                                          -0.4005         -0.3999             2             1             2             1
BM_sinsp_split_cv                                              -0.4217         -0.4212             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0035         +0.0035            57            57            57            57
BM_sinsp_concatenate_paths_relative_path_median                +0.0041         +0.0041            57            57            57            57
BM_sinsp_concatenate_paths_relative_path_stddev                +1.5400         +1.5484             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    +1.5312         +1.5396             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0023         -0.0023            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_median                   -0.0002         -0.0002            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.5551         -0.5546             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.5541         -0.5536             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0006         -0.0006            56            56            56            56
BM_sinsp_concatenate_paths_absolute_path_median                -0.0009         -0.0010            56            56            56            56
BM_sinsp_concatenate_paths_absolute_path_stddev                +0.6350         +0.6344             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.6360         +0.6354             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0178         +0.0178           396           403           396           403
BM_sinsp_split_container_image_median                          +0.0174         +0.0174           396           403           396           403
BM_sinsp_split_container_image_stddev                          +0.1431         +0.1415             1             2             1             2
BM_sinsp_split_container_image_cv                              +0.1230         +0.1215             0             0             0             0

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.

Project coverage is 74.45%. Comparing base (701e991) to head (d146c14).
Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
userspace/libsinsp/test/sinsp_with_test_input.cpp 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2140      +/-   ##
==========================================
- Coverage   74.46%   74.45%   -0.01%     
==========================================
  Files         254      254              
  Lines       33340    33345       +5     
  Branches     5724     5723       -1     
==========================================
+ Hits        24827    24828       +1     
+ Misses       8508     8493      -15     
- Partials        5       24      +19     
Flag Coverage Δ
libsinsp 74.45% <14.28%> (-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.

@poiana
Copy link
Contributor

poiana commented Oct 31, 2024

LGTM label has been added.

Git tree hash: f22fb43f2c073474825f54454bfc42e7174da15f

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 Nov 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 1340321 into falcosecurity:master Nov 5, 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