mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
This PR adds two benchmarks:
- Jumping 1k times from the global executor to a NIO EL and back using
`el.execute {}` and an `UncheckedContinuation`
- Jumping 1k times from the global executor to a NIO EL and back using
an actor that has a custom executor
Co-authored-by: Cory Benfield <lukasa@apple.com>
41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
// swift-tools-version:5.9
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "benchmarks",
|
|
platforms: [
|
|
.macOS("14")
|
|
],
|
|
dependencies: [
|
|
.package(path: "../"),
|
|
.package(url: "https://github.com/ordo-one/package-benchmark.git", from: "1.22.0"),
|
|
],
|
|
targets: [
|
|
.executableTarget(
|
|
name: "NIOPosixBenchmarks",
|
|
dependencies: [
|
|
.product(name: "Benchmark", package: "package-benchmark"),
|
|
.product(name: "NIOCore", package: "swift-nio"),
|
|
.product(name: "NIOPosix", package: "swift-nio"),
|
|
],
|
|
path: "Benchmarks/NIOPosixBenchmarks",
|
|
plugins: [
|
|
.plugin(name: "BenchmarkPlugin", package: "package-benchmark")
|
|
]
|
|
),
|
|
.executableTarget(
|
|
name: "NIOCoreBenchmarks",
|
|
dependencies: [
|
|
.product(name: "Benchmark", package: "package-benchmark"),
|
|
.product(name: "NIOCore", package: "swift-nio"),
|
|
.product(name: "NIOEmbedded", package: "swift-nio"),
|
|
],
|
|
path: "Benchmarks/NIOCoreBenchmarks",
|
|
plugins: [
|
|
.plugin(name: "BenchmarkPlugin", package: "package-benchmark")
|
|
]
|
|
),
|
|
]
|
|
)
|