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

fix(libsinsp): use correct regex for hex numbers #2132

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

therealbobo
Copy link
Contributor

What type of PR is this?

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

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

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

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This just fixes the regex used to match hex numbers.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
Copy link

Perf diff from master - unit tests

     2.05%     -0.87%  [.] sinsp::fetch_next_event
     3.43%     -0.72%  [.] sinsp_thread_manager::get_thread_ref
     5.48%     -0.71%  [.] sinsp_evt::get_type
     1.00%     +0.68%  [.] libsinsp::sinsp_suppress::process_event
     4.84%     -0.56%  [.] sinsp_parser::process_event
     0.79%     +0.54%  [.] libsinsp::events::is_unknown_event
     4.16%     +0.50%  [.] sinsp_evt::load_params
     1.42%     -0.50%  [.] sinsp_threadinfo::~sinsp_threadinfo
     2.90%     +0.50%  [.] gzfile_read
     0.53%     +0.39%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>

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.0189         +0.0190           149           152           149           152
BM_sinsp_split_median                                          +0.0266         +0.0267           149           153           149           153
BM_sinsp_split_stddev                                          -0.0949         -0.0934             2             2             2             2
BM_sinsp_split_cv                                              -0.1117         -0.1103             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0412         -0.0411            59            57            59            57
BM_sinsp_concatenate_paths_relative_path_median                -0.0419         -0.0418            59            57            59            57
BM_sinsp_concatenate_paths_relative_path_stddev                +0.5799         +0.5776             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    +0.6478         +0.6453             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0018         -0.0017            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0020         -0.0019            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.3142         +0.3242             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.3165         +0.3264             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0055         -0.0054            57            56            57            56
BM_sinsp_concatenate_paths_absolute_path_median                -0.0038         -0.0037            56            56            56            56
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.4299         -0.4301             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.4267         -0.4270             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0095         +0.0096           396           400           396           400
BM_sinsp_split_container_image_median                          +0.0098         +0.0099           396           400           396           400
BM_sinsp_split_container_image_stddev                          -0.3685         -0.3690             3             2             3             2
BM_sinsp_split_container_image_cv                              -0.3745         -0.3750             0             0             0             0

@FedeDP
Copy link
Contributor

FedeDP commented Oct 23, 2024

/cc @LucaGuerra
LGTM thanks for the fix!
/milestone 0.19.0

@poiana poiana added this to the 0.19.0 milestone Oct 23, 2024
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 Oct 23, 2024

LGTM label has been added.

Git tree hash: 3ffbbca9fda048471178490b2002043a99b5149d

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.46%. Comparing base (d8d345a) to head (6a25453).
Report is 27 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2132      +/-   ##
==========================================
+ Coverage   73.69%   74.46%   +0.76%     
==========================================
  Files         253      254       +1     
  Lines       31915    33333    +1418     
  Branches     5638     5733      +95     
==========================================
+ Hits        23521    24820    +1299     
- Misses       8394     8513     +119     
Flag Coverage Δ
libsinsp 74.46% <ø> (+0.76%) ⬆️

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
Member

@Andreagit97 Andreagit97 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 Oct 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 d87c96b into falcosecurity:master Oct 23, 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