Skip to content

Conversation

@alopezari
Copy link
Contributor

@alopezari alopezari commented Dec 2, 2025

This PR aims to remove the logic around performance tests iterations on QIT in favor of this other PR, which leveraged running multiple iterations to k6.

This drastically reduces performance tests duration from 1h with 7 iterations (baseline and SUT each) to 15m with 10 iterations.

Testing instructions

  1. Ensure you use a QIT version with the changes from this PR.
  2. Ensure you use a CD version with the changes from this other PR.
  3. Publish the latest version of performance tests package with php src/qit-cli.php package:publish ../compatibility-dashboard/ci/tests/performance/test-package/ latest.
  4. Run performance tests locally with php src/qit-cli.php run:performance automatewoo -vvv --test_packages=latest --local.
  5. Check the logs and ensure it k6 tests only runs twice on the QIT side (one for the baseline and another one for SUT), and check in the k6 execution logs that it runs 10 times there.
  6. Ensure tests pass and flow durations are shown in the k6 logs.
  7. Check that test artifacts are properly generated by QIT and no files or folders make any reference to iterations.
  8. Repeat steps 3-7 on staging while running the tests on CI with php src/qit-cli.php run:performance automatewoo -vvv --test_packages=latest.

@alopezari alopezari self-assigned this Dec 2, 2025
@alopezari alopezari requested a review from a team December 4, 2025 15:07
@alopezari alopezari marked this pull request as ready for review December 4, 2025 15:07
@alopezari alopezari requested review from a team and removed request for a team December 4, 2025 15:07
@zhongruige
Copy link
Contributor

This might be just from me running locally but I did hit some memory exhaustion errors, did you see this at all?

running (03m38.0s), 0/1 VUs, 10 complete and 0 interrupted iterations
frontend ✓ [ 100% ] 1 VUs  03m36.1s/10m0s  10/10 iters, 10 per VU
✓ k6 performance test passed
k6 results saved to: /var/folders/mz/zl1q1bdd6c16qkgsw4c7r3sm0000gn/T/qit-results/qitenv12e21c30e90ccad8/result.json
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/gregbell/workspace/qit-cli/src/src/Performance/Result/PerformanceTestResult.php on line 157

@alopezari
Copy link
Contributor Author

Hi @zhongruige!

I ran the tests on my local environment and they finished properly. It might be related to the memory allocated in your local env 🤔

@zhongruige
Copy link
Contributor

That's my guess, here's what I had mine set at:

Screenshot 2025-12-05 at 12 27 20 PM

I'll bump it up and give it a try.

Copy link
Contributor

@zhongruige zhongruige left a comment

Choose a reason for hiding this comment

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

Overall tested great for me, thanks @alopezari! I did notice a weird issue when trying to switch back using the binary I have in my path:

qit switch production

                                                                                                                        
 [ERROR] Invalid environment type.   

If I use the one built on the PR it works fine, do you see the same when toggling between them?

@alopezari
Copy link
Contributor Author

@zhongruige hmm I can't reproduce the issue you mentioned when switching environments using the manager from the branch remove/performance-tests-iterations-logic and my global qit binary. I started from the qit-cli remove/performance-tests-iteration-logic branch and then switched to trunk, as you can see below:

qit switch production
Backend switched to "production".
Sync complete.

qit switch staging
Backend switched to "staging".
Sync complete.

git checkout trunk
Switched to branch 'trunk'
Your branch is up to date with 'origin/trunk'.

qit switch local
Backend switched to "local".
Sync complete.

qit switch production
Backend switched to "production".
Sync complete.

qit switch local
Backend switched to "local".
Sync complete.

Did you perform any specific steps to reproduce this issue?

@zhongruige
Copy link
Contributor

Weird! I may have messed something up by accident, possibly when doing the utility package testing without realizing it. I'll get things set up again, but thanks for confirming this is working for you!

Copy link
Contributor

@zhongruige zhongruige left a comment

Choose a reason for hiding this comment

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

Happy to add my approval, nice work here!

@alopezari alopezari merged commit b8a132a into trunk Dec 5, 2025
13 checks passed
@alopezari alopezari deleted the remove/performance-tests-iteration-logic branch December 5, 2025 12:01
@alopezari alopezari mentioned this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants