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

ci: Automating scheduling benchmarking testing for PRs #2048

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DerekFrank
Copy link
Contributor

Fixes #N/A

Description

New CI to automatically run scheduling benchmark tests for both the existing code and proposed changes whenever a PR modifies a .go file. The new workflow will comment results into PR comments, and also store CPU and MEM profiles into a downloadable artifacts that reviewers and approvers can use to analyze any performance improvements or regressions. The current setup leverages the matrix functionality to make setting up new benchmark CI tests simple in the future.

This is a first iteration of a CI suite for performance testing. There are a couple, sometimes contradictory natural extensions for the future:

  • Automatically fail the test if performance regresses and remove performance results from PR comments
  • Add Consolidation performance benchmark tests
  • Parameterize more components of the go test call
  • Refactor the approach to run a single bench test per GitHub action for cleaner replication

CI testing will always be a moving target as the needs of the community develop, this is intended to be a quick and dirty approach to gather feedback and allow the CI performance testing to adapt to the needs of developers.

How was this change tested?

Simulated PRs in my own fork to demonstrate the functionality.

PR that shows benchmarking in action:

PR that shows how doc and other non .go functionality changes won't get tested:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 4, 2025
@k8s-ci-robot k8s-ci-robot requested review from engedaam and jmdeal March 4, 2025 00:39
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 4, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @DerekFrank. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 4, 2025
@coveralls
Copy link

coveralls commented Mar 4, 2025

Pull Request Test Coverage Report for Build 13710467043

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 81.633%

Totals Coverage Status
Change from base Build 13683176482: 0.02%
Covered Lines: 9596
Relevant Lines: 11755

💛 - Coveralls

Copy link
Contributor

@rschalo rschalo left a comment

Choose a reason for hiding this comment

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

Generally looks good. Are we able to run multiple tests and then create a report using benchstat?

@DerekFrank
Copy link
Contributor Author

Absolutely! I wanted to keep the initial CI relatively lightweight so I avoided any specific analysis of the results. We've got lots of paths to take the general concept of CI performance testing, I tend to err on the side of incremental, fast changes that allow us to see how contributors actually use the CI in practice. If a multi-run and benchstat analysis of the results setup is preferred, I would be happy to add that to the PR or to tackle it in a follow up PR

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 6, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants