Check for environment XCTEST_MEASURE_MAX_STDDEV for maxRelativeStandardDeviation - #506
Open
marcprux wants to merge 1 commit into
Open
Check for environment XCTEST_MEASURE_MAX_STDDEV for maxRelativeStandardDeviation#506marcprux wants to merge 1 commit into
marcprux wants to merge 1 commit into
Conversation
This was referenced Jan 6, 2025
Author
|
This can be worked around with a technique like jpsim/Yams@67c6444 |
marcprux
added a commit
to marcprux/SwiftCBOR
that referenced
this pull request
Mar 31, 2025
…ndard deviation on emulator (swiftlang/swift-corelibs-xctest#506)
hamchapman
pushed a commit
to valpackett/SwiftCBOR
that referenced
this pull request
Mar 31, 2025
* Android fix and CI * Add spcial-case measure function for Android to work around large standard deviation on emulator (swiftlang/swift-corelibs-xctest#506)
Contributor
|
@briancroom @stmontgomery Does Apple's XCTest have some equivalent mechanism? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
XCTest.measurecurrently uses 10.0 as the hardwiredmaxRelativeStandardDeviation, which can lead to test failures where a test is expected to have a high standard deviation:This PR adds a check for the environment variable
XCTEST_MEASURE_MAX_STDDEV, which it will use as the default maximum if it is set. Otherwise, it will fall back to 10%.