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(tests): introduce a new test helper #2181

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 tests

Does this PR require a change in the driver versions?

What this PR does / why we need it:

This PR introduces a new test helper. I had this helper in an old branch and it will become really useful when sinsp won't need any more OPEN_E event to populate the state.

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.55%     +1.16%  [.] sinsp_parser::reset
     4.32%     -0.73%  [.] gzfile_read
     1.65%     +0.73%  [.] sinsp::fetch_next_event
     1.24%     -0.72%  [.] sinsp_evt::get_param
     1.39%     +0.72%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
     1.14%     -0.67%  [.] sinsp_parser::event_cleanup
     0.30%     +0.62%  [.] 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
     1.23%     -0.57%  [.] sinsp_evt::get_syscall_return_value
     3.24%     -0.55%  [.] sinsp_thread_manager::find_thread
     5.34%     -0.54%  [.] next

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.0329         +0.0329           144           149           144           149
BM_sinsp_split_median                                          +0.0356         +0.0356           143           149           143           149
BM_sinsp_split_stddev                                          -0.3633         -0.3636             2             1             2             1
BM_sinsp_split_cv                                              -0.3836         -0.3839             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0018         -0.0018            57            57            57            57
BM_sinsp_concatenate_paths_relative_path_median                -0.0022         -0.0022            57            57            57            57
BM_sinsp_concatenate_paths_relative_path_stddev                -0.2530         -0.2536             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.2517         -0.2523             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0389         +0.0389            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0336         +0.0336            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +4.8306         +4.8303             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +4.6125         +4.6122             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0195         +0.0195            56            57            56            57
BM_sinsp_concatenate_paths_absolute_path_median                +0.0051         +0.0051            56            56            56            56
BM_sinsp_concatenate_paths_absolute_path_stddev                +5.0352         +5.0335             0             2             0             2
BM_sinsp_concatenate_paths_absolute_path_cv                    +4.9196         +4.9180             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0188         +0.0188           387           394           387           394
BM_sinsp_split_container_image_median                          +0.0205         +0.0205           386           394           386           394
BM_sinsp_split_container_image_stddev                          +0.2568         +0.2570             4             4             4             4
BM_sinsp_split_container_image_cv                              +0.2336         +0.2338             0             0             0             0

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.16%. Comparing base (f4a7bb5) to head (247a938).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2181   +/-   ##
=======================================
  Coverage   75.16%   75.16%           
=======================================
  Files         257      257           
  Lines       33736    33736           
  Branches     5755     5755           
=======================================
  Hits        25359    25359           
  Misses       8377     8377           
Flag Coverage Δ
libsinsp 75.16% <100.00%> (ø)

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.

@Andreagit97
Copy link
Member Author

Andreagit97 commented Dec 4, 2024

no idea why this is failing in build-libs-emscripten. Usually these failures are due to some missing casts but in this case i cannot see any missing cast

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: c5e0ce2ed1ebcdcc3dc55ad6fe032ba798fe61cc

@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 556d868 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