Browse Source

Update NIO dependencies in QPSBenchmark (#1286)

George Barnett 4 years ago
parent
commit
095d21a5ae

+ 5 - 4
Performance/QPSBenchmark/Package.swift

@@ -22,12 +22,11 @@ let package = Package(
   products: [
     .executable(name: "QPSBenchmark", targets: ["QPSBenchmark"]),
   ],
-
   dependencies: [
     .package(path: "../../"),
-    .package(url: "https://github.com/apple/swift-nio.git", from: "2.22.0"),
+    .package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
     .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
-    .package(url: "https://github.com/apple/swift-argument-parser.git", from: "0.3.0"),
+    .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.0.0"),
     .package(
       url: "https://github.com/swift-server/swift-service-lifecycle.git",
       from: "1.0.0-alpha"
@@ -43,7 +42,9 @@ let package = Package(
       name: "QPSBenchmark",
       dependencies: [
         .product(name: "GRPC", package: "grpc-swift"),
-        .product(name: "NIO", package: "swift-nio"),
+        .product(name: "NIOCore", package: "swift-nio"),
+        .product(name: "NIOPosix", package: "swift-nio"),
+        .product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
         .product(name: "ArgumentParser", package: "swift-argument-parser"),
         .product(name: "Logging", package: "swift-log"),
         .product(name: "Lifecycle", package: "swift-service-lifecycle"),

+ 3 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/AsyncClient.swift

@@ -18,7 +18,9 @@ import BenchmarkUtils
 import Foundation
 import GRPC
 import Logging
-import NIO
+import NIOConcurrencyHelpers
+import NIOCore
+import NIOPosix
 
 /// Client to make a series of asynchronous calls.
 final class AsyncQPSClient<RequestMakerType: RequestMaker>: QPSClient {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/AsyncPingPongRequestMaker.swift

@@ -17,7 +17,7 @@
 import Foundation
 import GRPC
 import Logging
-import NIO
+import NIOCore
 
 /// Makes streaming requests and listens to responses ping-pong style.
 /// Iterations can be limited by config.

+ 2 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/AsyncServer.swift

@@ -17,7 +17,8 @@
 import Foundation
 import GRPC
 import Logging
-import NIO
+import NIOCore
+import NIOPosix
 
 /// Server setup for asynchronous requests.
 final class AsyncQPSServer: QPSServer {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/AsyncUnaryRequestMaker.swift

@@ -16,7 +16,7 @@
 
 import GRPC
 import Logging
-import NIO
+import NIOCore
 
 /// Makes unary requests to the server and records performance statistics.
 final class AsyncUnaryRequestMaker: RequestMaker {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/BenchmarkServiceImpl.swift

@@ -16,7 +16,7 @@
 
 import Foundation
 import GRPC
-import NIO
+import NIOCore
 
 /// Implementation of asynchronous service for benchmarking.
 final class AsyncQPSServerImpl: Grpc_Testing_BenchmarkServiceProvider {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/ClientInterface.swift

@@ -15,7 +15,7 @@
  */
 
 import GRPC
-import NIO
+import NIOCore
 
 /// Protocol which clients must implement.
 protocol QPSClient {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/ClientUtilities.swift

@@ -15,7 +15,7 @@
  */
 
 import GRPC
-import NIO
+import NIOCore
 
 /// Pair of host and port.
 struct HostAndPort {

+ 2 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/QPSWorker.swift

@@ -16,7 +16,8 @@
 
 import GRPC
 import Logging
-import NIO
+import NIOCore
+import NIOPosix
 
 /// Sets up and runs a worker service which listens for instructions on what tests to run.
 /// Currently doesn't understand TLS for communication with the driver.

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/RequestMaker.swift

@@ -16,7 +16,7 @@
 
 import GRPC
 import Logging
-import NIO
+import NIOCore
 
 /// Implement to provide a method of making requests to a server from a client.
 protocol RequestMaker {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/ServerInterface.swift

@@ -15,7 +15,7 @@
  */
 
 import GRPC
-import NIO
+import NIOCore
 
 /// Interface server types must implement.
 protocol QPSServer {

+ 1 - 1
Performance/QPSBenchmark/Sources/QPSBenchmark/Runtime/WorkerServiceImpl.swift

@@ -15,7 +15,7 @@
  */
 
 import GRPC
-import NIO
+import NIOCore
 
 // Implementation of the control service for communication with the driver process.
 class WorkerServiceImpl: Grpc_Testing_WorkerServiceProvider {