RuntimeTools / SwiftMetrics

Swift Application Metrics instruments the Swift runtime for performance monitoring, providing the monitoring data programatically via an API or visually with an Eclipse Client.
https://developer.ibm.com/swift/monitoring-diagnostics/application-metrics-for-swift/
Other
154 stars 49 forks source link

Conditionally allow the switch to use Kitura-NIO with Kitura #201

Closed mamabusi closed 5 years ago

djones6 commented 5 years ago

This PR allows Kitura users to compile projects that include SwiftMetrics as a dependency with the KITURA_NIO=1 environment variable set. This instructs Kitura (and other dependencies) to use the Kitura-NIO package instead of the Kitura-net package.

The intention is that in the future, NIO will become the default (a replacement for Kitura-net), but for various reasons we're not ready to do that yet, and are supporting this dual-path approach instead.

SwiftMetrics depends directly on Kitura-WebSocket, which does not yet support both -NIO and -net, but as a temporary workaround we have a branch which works with NIO mode. This PR switches to a tag from that branch when the KITURA_NIO environment variable is set.

@mattcolegate could you review?