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 the first google benchmark #2021

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

Andreagit97
Copy link
Member

What type of PR is this?

/kind feature

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 the first Google benchmark. This is just the scaffolding we should add more tests to it. For example, a good candidate could be the scap-file benchmark that we are running today in our perf CI @FedeDP

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@FedeDP
Copy link
Contributor

FedeDP commented Aug 26, 2024

Love this, thank you!
Any chance to update the CI jobs to also run benchmarks (so that for now we test that they build and work fine, but in the future we will actually use the benchmark data to generate diff from master)?

Copy link

github-actions bot commented Aug 26, 2024

Perf diff from master - unit tests

     6.82%     +1.10%  [.] sinsp::next
     5.19%     -1.08%  [.] sinsp_parser::process_event
     6.52%     -0.91%  [.] next
     3.57%     +0.87%  [.] sinsp_thread_manager::get_thread_ref
     5.88%     -0.82%  [.] sinsp_evt::get_type
     1.41%     -0.71%  [.] scap_event_encode_params_v
     0.91%     +0.68%  [.] sinsp_evt::get_ts
     1.75%     -0.53%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>
     1.22%     -0.48%  [.] 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.76%     +0.43%  [.] scap_event_decode_params

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

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.21%. Comparing base (2b0fa60) to head (a05ffdf).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2021   +/-   ##
=======================================
  Coverage   74.21%   74.21%           
=======================================
  Files         253      253           
  Lines       30845    30845           
  Branches     5400     5420   +20     
=======================================
  Hits        22893    22893           
- Misses       7925     7952   +27     
+ Partials       27        0   -27     
Flag Coverage Δ
libsinsp 74.21% <ø> (ø)

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.

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
@Andreagit97 Andreagit97 force-pushed the add_google_benchmarks branch 3 times, most recently from 9623f5c to 8ca26a1 Compare August 26, 2024 15:28

- name: Install a recent version of cmake ⛓️
run: |
curl -L -o /tmp/cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-linux-$(uname -m).tar.gz
Copy link
Member Author

Choose a reason for hiding this comment

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

we need at least version 3.11 for FetchContent

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@Andreagit97 Andreagit97 force-pushed the add_google_benchmarks branch 2 times, most recently from 33d1c52 to 113083c Compare August 27, 2024 07:45
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
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 Aug 27, 2024

LGTM label has been added.

Git tree hash: 79dc8071fdc435e35fc47bd1f0d30ccd59aa41c8

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 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 [Andreagit97,FedeDP,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 bc7482f into falcosecurity:master Aug 27, 2024
46 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