-
Notifications
You must be signed in to change notification settings - Fork 189
Add JSON benchmarks and make benchmark package build for more targets #810
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
Conversation
@swift-ci test |
Benchmarks/Package.swift
Outdated
|
||
case .useGitHubPackage: | ||
#if os(macOS) | ||
packageDependency.append(.package(url: "https://github.com/apple/swift-foundation", revision: "8a44479120e4ae0ac8cdbf801943daa0d1e874ad")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have this depend on the main
branch rather than a particular hash?
@@ -67,6 +67,8 @@ func registerPredicateTests_disabled() { | |||
#endif | |||
|
|||
func registerPredicateTests() { | |||
// Temporarily disabled due to link issue | |||
#if FOUNDATION_FRAMEWORK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be #if USE_PACKAGE || os(macOS)
(the link issue was only present in non-Darwin toolchains).
FWIW, the link issue should now be resolved, but the macro doesn't exist in a Windows toolchain yet so eventually this will have to be #if USE_PACKAGE || !os(Windows)
let twitter = try! _JSONDecoder().decode(TwitterArchive.self, from: twitterData) | ||
|
||
Benchmark("Canada-decodeFromJSON") { benchmark in | ||
let result = try! _JSONDecoder().decode(FeatureCollection.self, from: canadaData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closure passed to the Benchmark initializer can throw, so we can just use try
here. (The benchmarks closure however cannot throw, sadly.)
@swift-ci test |
…swiftlang#810) * Add JSON benchmarks and make benchmark package build for more targets * Address review feedback
Adds some JSON benchmarks to the suite, and also makes the benchmarks build for these configs:
Linux, Swift 5.10 (toolchain)
Linux, Swift 6.0 (toolchain)
Linux, Swift 6.0 (package, or local checkout)
macOS (system Foundation.framework)
macOS (package, or local checkout)