Benchmarks: bump to swift-tools-version 6.1, support disabling jemalloc, fix Swift 6 concurrency#1958
Merged
Merged
Conversation
Contributor
Author
|
@swift-ci please test |
1 similar comment
Contributor
Author
|
@swift-ci please test |
jmschonfeld
approved these changes
May 8, 2026
| @@ -1,12 +1,12 @@ | |||
| // swift-tools-version: 5.9 | |||
| // swift-tools-version: 6.1 | |||
Contributor
There was a problem hiding this comment.
The main package manifest is already at swift tools version 6.2, so if you want you could update it to 6.2 to be the same here
| dependencies: targetDependency, | ||
| path: "Benchmarks/JSON", | ||
| resources: [.copy("Resources")], | ||
| resources: [.process("Resources")], |
Contributor
There was a problem hiding this comment.
We might want to make the same change to the main package swift for test resources
Contributor
Author
There was a problem hiding this comment.
Changing this in the main package caused some JSON test failures, so I'll leave it unchanged for now.
Contributor
|
FYI hope to soon have ordo-one/benchmark#333 to better sort the jemalloc thing. |
Contributor
Author
COOL! |
Contributor
Author
|
@swift-ci please test |
1 similar comment
Contributor
Author
|
@swift-ci please test |
jmschonfeld
approved these changes
May 12, 2026
…oc, fix Swift 6 concurrency
- Bump Benchmarks/Package.swift to swift-tools-version 6.1 (required for SwiftPM traits API)
- Add BENCHMARK_DISABLE_JEMALLOC env var support: when set, package-benchmark is fetched with
traits: [] to disable the default jemalloc trait, enabling builds in environments where
jemalloc is unavailable.
- Fix JSONBenchmarks resource bundle: change .copy("Resources") to .process("Resources") so
JSON test files land at Contents/Resources/ rather than Contents/Resources/Resources/
- Fix Swift 6 strict concurrency in all 15 benchmark targets: annotate `let benchmarks` closures
as `@Sendable () -> Void`
- Fix BenchmarkTimeZone.swift: replace NSTimeZone.knownTimeZoneNames with TimeZone.knownTimeZoneIdentifiers
- Fix BenchmarkAttributedString.swift: annotate TestAttribute.name with nonisolated(unsafe)
(the mutation is intentional single-threaded benchmark setup creating 100k distinct entries)
- Document jemalloc install steps and BENCHMARK_DISABLE_JEMALLOC usage in Foundation_Build_Process.md
28bd23e to
edb98b4
Compare
Contributor
Author
|
@swift-ci please test |
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.
Motivation
BENCHMARK_DISABLE_JEMALLOC=1 swift package benchmarkdoesn't actually disable jemalloc when using swift 6+ toolchainFix
BENCHMARK_DISABLE_JEMALLOCenv var support: when set, package-benchmark is fetched withtraits: [] to disable the default jemalloc trait, enabling builds in environments where
jemalloc is unavailable.
.copy("Resources")to.process("Resources")soJSON test files land at
Contents/Resources/rather thanContents/Resources/Resources/let benchmarksclosuresas
@Sendable () -> VoidNSTimeZone.knownTimeZoneNameswithTimeZone.knownTimeZoneIdentifiersnonisolated(unsafe)(the mutation is intentional single-threaded benchmark setup creating 100k distinct entries)