Skip to content

Add scalibr os benchmarks - #1044

Open
ganochenkodg wants to merge 15 commits into
GoogleCloudPlatform:masterfrom
ganochenkodg:scalibr-os-benchmarks
Open

Add scalibr os benchmarks#1044
ganochenkodg wants to merge 15 commits into
GoogleCloudPlatform:masterfrom
ganochenkodg:scalibr-os-benchmarks

Conversation

@ganochenkodg

@ganochenkodg ganochenkodg commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

New test TestScalibrBenchmark to test os/dpkg, os/rpm, os/cos extractors. Sample command to run the test:

sudo go test -v -tags=benchmark -run=TestScalibrBenchmark ./packages/ 2>&1 | grep ' | '

Sample output on debian 13:

    scalibr_bench_test.go:211: | Scenario | Avg Scan Time | Avg Heap Alloc | Peak RAM RSS | Peak CPU % | Mean CPU % | Pkgs Found |
    scalibr_bench_test.go:212: | --- | --- | --- | --- | --- | --- | --- |
    scalibr_bench_test.go:183: | `All os extractors` | 1.531515958s | 138.47 MB | 22.58 MB | 199.8% | 115.9% | 442 |
    scalibr_bench_test.go:183: | `os/dpkg` | 1.481452628s | 124.24 MB | 22.60 MB | 204.1% | 115.0% | 442 |
    scalibr_bench_test.go:183: | `os/rpm` | 1.455361571s | 119.27 MB | 21.58 MB | 204.6% | 114.5% | 0 |
    scalibr_bench_test.go:183: | `os/cos` | 1.442813717s | 119.29 MB | 21.09 MB | 195.3% | 116.0% | 0 |

@google-oss-prow

Copy link
Copy Markdown

Hi @ganochenkodg. Thanks for your PR.

I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we move the code to a dedicated utiltrace package?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just checked if it's possible. Unfortunately, no:

  1. Circular import dependency. The packages package already imports github.com/GoogleCloudPlatform/osconfig/util/utiltrace (in trace.go). So import packages in util/utiltrace/ produces an error - import cycle not allowed
  2. The benchmark relies on scalibrInstalledPackagesProvider, which is an unexported struct defined inside the packages package and cannot be accessed outside of it without code refactoring

@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

@petercieslak

Copy link
Copy Markdown
Contributor

/ok-to-test

@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ganochenkodg, petercieslak
Once this PR has been reviewed and has the lgtm label, please assign paulinakania for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@google-oss-prow google-oss-prow Bot removed the lgtm label Sep 2, 2026
@google-oss-prow

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

2 similar comments
@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

@petercieslak

Copy link
Copy Markdown
Contributor

/gcbrun

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.

2 participants