Skip to content

fix(processbaseline): evaluator bench test#17071

Merged
janisz merged 1 commit intomasterfrom
fix_evaluator_bench_test
Oct 3, 2025
Merged

fix(processbaseline): evaluator bench test#17071
janisz merged 1 commit intomasterfrom
fix_evaluator_bench_test

Conversation

@janisz
Copy link
Contributor

@janisz janisz commented Sep 30, 2025

Description

Currently the db object is created once for all subtests. This results in growing dataset with every run making it impossible to set count greater than 1 as it will increase data for every subtests making benchmark slower with every next run causing high deviation in results and making them harder to compare. This PR moves db creation into a subtest where it will be used and teardown after that subtest.

Spotted on:

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

go test -tags sql_integration -run=NO -bench=BenchmarkEvaluateBaselinesAndPersistResult  ./central/processbaseline/evaluator/. -count 6 -benchmem -benchtime 3s -timeout 1h

Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 4799ea6.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-924-g4799ea620d.

@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.79%. Comparing base (91010e2) to head (4799ea6).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17071      +/-   ##
==========================================
- Coverage   48.80%   48.79%   -0.01%     
==========================================
  Files        2707     2711       +4     
  Lines      202201   202272      +71     
==========================================
+ Hits        98679    98694      +15     
- Misses      95752    95795      +43     
- Partials     7770     7783      +13     
Flag Coverage Δ
go-unit-tests 48.79% <ø> (-0.01%) ⬇️

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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@openshift-ci
Copy link

openshift-ci bot commented Sep 30, 2025

@janisz: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/gke-qa-e2e-tests 4799ea6 link false /test gke-qa-e2e-tests

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@dashrews78 dashrews78 left a comment

Choose a reason for hiding this comment

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

Thanks

@janisz janisz merged commit f830aaf into master Oct 3, 2025
88 of 89 checks passed
@janisz janisz deleted the fix_evaluator_bench_test branch October 3, 2025 08:09
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.

3 participants