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

[Compiler] Adjust parameters to reduce run-time when race detector is enabled #3732

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Jan 23, 2025

Work towards #3742

Description

TestRecursiveFib takes longer than the default timeout of 10min when the race detector is enabled, which is the case on CI. I don't know/understand why.

Testing a smaller is sufficient and brings down the run-time to a reasonable sub-second amount.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent requested a review from SupunS as a code owner January 23, 2025 00:12
@turbolent turbolent requested a review from jsproz January 23, 2025 00:13
@turbolent turbolent self-assigned this Jan 23, 2025
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:feature/compiler commit c942246
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! A larger value for n must have gotten committed accidentally; I remember the value was 7 or something (similar to the imperative fib). I think the recursive fib time increases exponentially somewhere after n=35. Maybe that's why it takes a longer time in CI.

@turbolent turbolent closed this Jan 23, 2025
@turbolent turbolent reopened this Jan 23, 2025
@turbolent turbolent merged commit 31b560e into feature/compiler Jan 23, 2025
7 of 9 checks passed
@turbolent turbolent deleted the bastian/fix-long-test branch January 23, 2025 17:47
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.

2 participants