Skip to content

Commit

Permalink
Prevent standard deviation test issue in performance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed May 7, 2020
1 parent 566809c commit ad1b545
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>0.0252</real>
<real>0.00461</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
Expand Down
6 changes: 3 additions & 3 deletions Tests/AnyLintTests/FilesSearchTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ final class FilesSearchTests: XCTestCase {
)
}

measure {
// first run
XCTAssertEqual(Set(fileSearchCode()), Set(swiftSourcesFilePaths.map { "\(tempDir)/\($0.subpath)" }))
// first run
XCTAssertEqual(Set(fileSearchCode()), Set(swiftSourcesFilePaths.map { "\(tempDir)/\($0.subpath)" }))

measure {
// subsequent runs (should be much faster)
XCTAssertEqual(Set(fileSearchCode()), Set(swiftSourcesFilePaths.map { "\(tempDir)/\($0.subpath)" }))
XCTAssertEqual(Set(fileSearchCode()), Set(swiftSourcesFilePaths.map { "\(tempDir)/\($0.subpath)" }))
Expand Down

0 comments on commit ad1b545

Please sign in to comment.