From b36e43611ae1819c966815671cb0f296f31c92df Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Wed, 12 Oct 2022 10:48:34 -0700 Subject: [PATCH 1/2] Performance Tests: --runInBand to avoid performance issues in CI environment Some projects have seen dramatic performance bottlenecks in CI environments because of the way `jest` parallelizes its test runs and bloats its memory usage. In this patch we're running the tests in serial to determine if this sequential-vs-parallel effect is in play in our GitHub Actions runs. --- bin/plugin/commands/performance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/plugin/commands/performance.js b/bin/plugin/commands/performance.js index 5d2fe7437ed29..b50e8b2cc40b6 100644 --- a/bin/plugin/commands/performance.js +++ b/bin/plugin/commands/performance.js @@ -201,7 +201,7 @@ function curateResults( testSuite, results ) { */ async function runTestSuite( testSuite, performanceTestDirectory, runKey ) { await runShellScript( - `npm run test:performance -- packages/e2e-tests/specs/performance/${ testSuite }.test.js`, + `npm run test:performance -- --runInBand packages/e2e-tests/specs/performance/${ testSuite }.test.js`, performanceTestDirectory ); const resultsFile = path.join( From fe252cf31564072be642bc875c83c6beff0f35b6 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Fri, 10 Feb 2023 16:07:43 -0700 Subject: [PATCH 2/2] Run 10 rounds to look at variability --- .github/workflows/performance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 0ee8ed5545c9b..39c8cddb51204 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -42,7 +42,7 @@ jobs: - name: Compare performance with trunk if: github.event_name == 'pull_request' - run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA + run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA --rounds 15 - name: Store performance measurements if: github.event_name == 'pull_request'