mirror of
https://github.com/apple/swift-http-types
synced 2026-11-22 04:30:40 +00:00
### Motivation We want to measurably improve performance. ### Changes - Add a selection of use-cases that we can use to optimize our code - Add thresholds for the newly added benchmarks so that we can ensure that we don't regress in CI ### Result A great baseline to start performance work.
40 lines
1.3 KiB
Swift
40 lines
1.3 KiB
Swift
// swift-tools-version:6.1
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "Benchmarks",
|
|
platforms: [
|
|
.macOS(.v13)
|
|
],
|
|
dependencies: [
|
|
.package(name: "swift-http-types", path: "../"),
|
|
.package(url: "https://github.com/ordo-one/package-benchmark.git", from: "1.36.2"),
|
|
],
|
|
targets: [
|
|
.executableTarget(
|
|
name: "Benchmarks",
|
|
dependencies: [
|
|
.product(name: "Benchmark", package: "package-benchmark"),
|
|
.product(name: "HTTPTypes", package: "swift-http-types"),
|
|
],
|
|
path: "Benchmarks/HTTPFieldsBenchmarks",
|
|
plugins: [
|
|
.plugin(name: "BenchmarkPlugin", package: "package-benchmark")
|
|
]
|
|
),
|
|
.executableTarget(
|
|
name: "FoundationBenchmarks",
|
|
dependencies: [
|
|
.product(name: "Benchmark", package: "package-benchmark"),
|
|
.product(name: "HTTPTypes", package: "swift-http-types"),
|
|
.product(name: "HTTPTypesFoundation", package: "swift-http-types"),
|
|
],
|
|
path: "Benchmarks/HTTPTypesFoundationBenchmarks",
|
|
plugins: [
|
|
.plugin(name: "BenchmarkPlugin", package: "package-benchmark")
|
|
]
|
|
),
|
|
]
|
|
)
|