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

(NFC) Speed up random tests by 55-60% #25439

Merged
merged 9 commits into from
Jan 26, 2023
Merged

Conversation

totten
Copy link
Member

@totten totten commented Jan 26, 2023

Before

Slower

After

Faster

Technical Details

useTransaction()

Comments

I noticed that the CRM suite is particularly slow, so I skimmed the recent results. While there are a few particularly expensive tests (>1min ea), they don't actually account for a huge percentage of the suite. The overhead is more diffuse - there's a huge number of tests, all with a chunk of overhead. This kind of thing reduces that overhead.

Before: On local i3-12100, takes ~90s (avg over 2 runs)

After: On local i3-12100, take ~40s (avg over 2 runs)
Before: On local i3-12100, takes ~64s (avg over two runs)

After: On local i3-12100, take ~28s (avg over two runs)
Before: On local i3-12100, takes ~34s (avg over two runs)

After: On local i3-12100, take ~14s (avg over two runs)
Before: On local i3-12100, takes ~34s (avg over two runs)

After: On local i3-12100, take ~14s (avg over two runs)
Before: On local i3-12100, takes ~17s (avg over two runs)

After: On local i3-12100, take ~8s (avg over two runs)
@civibot
Copy link

civibot bot commented Jan 26, 2023

(Standard links)

@civibot civibot bot added the master label Jan 26, 2023
@totten
Copy link
Member Author

totten commented Jan 26, 2023

I noticed that the CRM suite is particularly slow...

Just breaking that out -- the CRM and api3 suites are the longest/slowest (circa 30min-70min, depending on the node/hardware/concurrent load). When suites are running in parallel, these tend to finish last - so optimizing these suites should have more impact on the total/perceived time (compared to optimizing other suites).

@totten totten merged commit b2b7fd9 into civicrm:master Jan 26, 2023
@totten totten deleted the master-test-tx branch January 26, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant