Skip to content

feat(libsinsp): getopt transfomer#2842

Draft
therealbobo wants to merge 2 commits intofalcosecurity:masterfrom
therealbobo:therealbobo-getopt-transformer
Draft

feat(libsinsp): getopt transfomer#2842
therealbobo wants to merge 2 commits intofalcosecurity:masterfrom
therealbobo:therealbobo-getopt-transformer

Conversation

@therealbobo
Copy link
Copy Markdown
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 test

/kind feature

/kind sync

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-modern-bpf

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

Which issue(s) this PR fixes:

Fixes #1928

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Copy Markdown
Contributor

poiana commented Feb 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: therealbobo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 16, 2026

Perf diff from master - unit tests

    10.65%     -1.10%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_lock_nothrow()
    15.30%     +0.96%  [.] std::__shared_ptr<sinsp_threadinfo, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__weak_ptr<sinsp_threadinfo, (__gnu_cxx::_Lock_policy)2> const&, std::nothrow_t)
    11.51%     +0.60%  [.] sinsp_threadinfo::get_main_thread()
     4.48%     +0.52%  [.] thread_group_info::get_first_thread() const
    13.65%     +0.47%  [.] std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_get_use_count() const
     9.23%     -0.38%  [.] std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()
     4.08%     -0.34%  [.] sinsp_thread_manager::create_thread_dependencies(std::shared_ptr<sinsp_threadinfo> const&)
     9.23%     +0.18%  [.] sinsp_threadinfo::update_main_fdtable()
     8.08%     -0.14%  [.] sinsp_threadinfo::get_fd_table()
     0.16%     -0.13%  [.] sinsp_parser::parse_clone_exit_child(sinsp_evt&, sinsp_parser_verdict&) const

Heap diff from master - unit tests

peak heap memory consumption: -1.56K
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: -32B
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.0222         -0.0219           240           235           240           235
BM_sinsp_split_median                                          -0.0217         -0.0212           240           235           240           235
BM_sinsp_split_stddev                                          -0.4043         -0.4002             2             1             2             1
BM_sinsp_split_cv                                              -0.3908         -0.3867             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0712         -0.0711            76            71            76            71
BM_sinsp_concatenate_paths_relative_path_median                -0.0844         -0.0841            76            70            76            70
BM_sinsp_concatenate_paths_relative_path_stddev                +2.9493         +2.8979             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +3.2520         +3.1960             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0147         +0.0148            42            43            42            43
BM_sinsp_concatenate_paths_empty_path_median                   +0.0067         +0.0067            42            43            42            43
BM_sinsp_concatenate_paths_empty_path_stddev                  +12.5792        +12.6223             0             1             0             1
BM_sinsp_concatenate_paths_empty_path_cv                      +12.3823        +12.4234             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0752         -0.0752            75            69            75            69
BM_sinsp_concatenate_paths_absolute_path_median                -0.0772         -0.0773            75            69            75            69
BM_sinsp_concatenate_paths_absolute_path_stddev                +0.2396         +0.2652             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.3405         +0.3681             0             0             0             0

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 84.54106% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.06%. Comparing base (e01d603) to head (2a62824).

Files with missing lines Patch % Lines
userspace/libsinsp/test/filter_transformer.ut.cpp 77.95% 28 Missing ⚠️
...sinsp/sinsp_filtercheck_multivalue_transformer.cpp 94.93% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2842      +/-   ##
==========================================
+ Coverage   74.96%   75.06%   +0.09%     
==========================================
  Files         296      296              
  Lines       31472    31678     +206     
  Branches     4977     4998      +21     
==========================================
+ Hits        23594    23779     +185     
- Misses       7878     7899      +21     
Flag Coverage Δ
libsinsp 75.06% <84.54%> (+0.09%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Roberto Scolaro <[email protected]>
@therealbobo therealbobo force-pushed the therealbobo-getopt-transformer branch from 458ad4c to 9c85d8e Compare March 31, 2026 12:02
@therealbobo therealbobo force-pushed the therealbobo-getopt-transformer branch from 9c85d8e to 2a62824 Compare March 31, 2026 12:05
@therealbobo therealbobo changed the title [WIP] feat(libsinsp): getopt transfomer feat(libsinsp): getopt transfomer Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

New transformer: getopt(<args>, <optstring>)

2 participants