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

Integrate Performance Tests in CI #10463

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

cdamus
Copy link
Contributor

@cdamus cdamus commented Nov 25, 2021

What it does

Adds a “Performance Tests” job to the build workflow in the project’s GitHub Actions to execute the browser and Electron start-up performance scripts, record and chart the results, and compare with past results for regression. The job is configured to

  • Run only in the scheduled nightly build on the master branch
  • Publish results in the GitHub pages at https://eclipse-theia.github.io/theia/tests/performance/
  • On detection of measurements 150% longer than recent history, annotate the commit that was tested with a comment indicating that it may cause a performance regression
  • The build does not fail on detection of regression. It is a warning condition only

Example output: an example of the performance history chart produced by these changes is available here.

A new dependency on the third-party github-action-benchmark GitHub action is added. It is configured to

  • Commit and push performance history updates and visualization charts to the project’s GitHub pages. Note that this does not interfere with the /docs/next/ content already published on this branch. This can be seen here
  • Annotate the HEAD commit with comments when performance regression is detected

Resolves #10443.

Contributed on behalf of STMicroelectronics.

How to test

Execute the performance scripts pretending the GitHub CI environment:

$ GITHUB_ACTIONS=true yarn performance:startup:browser && \
>   yarn performance:startup:electron

This will record performance measurements to the performance-result.json file that the GitHub benchmark action picks up for its history recording and analysis.

As the build job is configured not to run on PR branches but only on the master branch, testing the rest of the flow is more tricky. The behaviour can be observed in this fork in which the changes were initially drafted.

Review checklist

Reminder for reviewers

@cdamus cdamus force-pushed the electron-startup-ci branch from 66ec2d1 to 850c411 Compare November 25, 2021 21:54
@cdamus cdamus force-pushed the electron-startup-ci branch from 850c411 to fdb7959 Compare December 8, 2021 02:30
@colin-grant-work colin-grant-work added ci issues related to CI / tests performance issues related to performance labels Dec 22, 2021
@cdamus cdamus force-pushed the electron-startup-ci branch from fdb7959 to 29a5ef7 Compare January 11, 2022 15:28
@cdamus
Copy link
Contributor Author

cdamus commented Jan 11, 2022

Commit 29a5ef7 rebases the branch onto recent changes on master and resolves merge conflicts.

@cdamus cdamus force-pushed the electron-startup-ci branch from 29a5ef7 to 49d01f7 Compare November 24, 2022 20:19
@Niklas-Dahlquist
Copy link
Contributor

Bumping, much needed feature to be able to improve the startup performance, this is the first milestone to start to be able to track the duration to see what can be improved.

CHANGELOG.md Outdated Show resolved Hide resolved
.github/workflows/ci-cd.yml Outdated Show resolved Hide resolved
@cdamus cdamus force-pushed the electron-startup-ci branch from 49d01f7 to 4cc485d Compare November 25, 2022 19:20
@cdamus
Copy link
Contributor Author

cdamus commented Nov 25, 2022

Commit b41f101 rebases the original commit again following the release tag of 1.32.0 in the changelog, adding a new 1.33.0 section and putting the change entry there.

Commit 4cc485d then factors out the performance-test workflow into its own file with, for now, only the dispatch trigger. I've also made a few other updates to align with changes in the dependencies used by other builds (Node version, Ubuntu version, action versions) in the months since the original contribution.

@cdamus
Copy link
Contributor Author

cdamus commented Nov 25, 2022

I don't recognize the test failures on Ubuntu as anything that I could have broken with this PR. Not sure what to do about that.

CHANGELOG.md Outdated Show resolved Hide resolved
.github/workflows/performance-tests.yml Outdated Show resolved Hide resolved
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

The updates look good to me 👍
I'm fine with keeping it as a manual workflow dispatch for the time being.

@cdamus
Copy link
Contributor Author

cdamus commented Nov 28, 2022

This time, one of the Linux test platforms that failed previously passed and one of the Mac test platforms that passed previously failed. Definitely seems unrelated to the changes in this PR.

- update performance scripts to report results for history and regression test
- configure the build workflow for performance tests
- track performance history
- use benchmark action to check for regression
- publish results to GH Pages
- only use the dispatch trigger, for now

Contributed on behalf of STMicroelectronics.

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
@cdamus cdamus force-pushed the electron-startup-ci branch from c785524 to 6531598 Compare December 2, 2022 13:50
@cdamus
Copy link
Contributor Author

cdamus commented Dec 2, 2022

Commit 6531598 resolves the usual changelog conflict. And so I took the opportunity while to doing that to squash the branch. No other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci issues related to CI / tests performance issues related to performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance Testing in CI
5 participants