Files
Fabian Fett 8ec4cbcfa3 Add Benchmarks (#133)
### 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.
2026-08-12 12:39:04 +00:00

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")
]
),
]
)