Skip to content

Commit

Permalink
CI: use DEVELOPMENT-SNAPSHOT-2019-01-23-a (#780)
Browse files Browse the repository at this point in the history
Motivation:

Newer Swift versions are good and we should test them, this one threw a few curveballs at us:
- started using `posix_memalign` which needed fixing in our alloc tests (fixed in #782)
- the optimiser decided not to inline a function that needs to be inlined

Modifications
- `@inline(__always)` to help the optimiser
- update Swift version

Result:
- fixes #727
- fixes #726
  • Loading branch information
weissi committed Jan 25, 2019
1 parent 0eb85a4 commit 58a58b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Sources/NIOHTTP1/HTTPEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ private func writeTrailers(wrapOutboundOut: (IOData) -> NIOAny, ctx: ChannelHand
}
}

// starting about swift-5.0-DEVELOPMENT-SNAPSHOT-2019-01-20-a, this doesn't get automatically inlined, which costs
// 2 extra allocations so we need to help the optimiser out.
@inline(__always)
private func writeHead(wrapOutboundOut: (IOData) -> NIOAny, writeStartLine: (inout ByteBuffer) -> Void, ctx: ChannelHandlerContext, headers: HTTPHeaders, promise: EventLoopPromise<Void>?) {

var buffer = ctx.channel.allocator.buffer(capacity: 256)
Expand Down
14 changes: 7 additions & 7 deletions docker/docker-compose.1804.50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
args:
ubuntu_version: "18.04"
swift_version: "5.0"
swift_flavour: "DEVELOPMENT-SNAPSHOT-2018-12-28-a"
swift_flavour: "DEVELOPMENT-SNAPSHOT-2019-01-23-a"
swift_builds_suffix: "branch"
skip_ruby_from_ppa: "true"

Expand All @@ -19,20 +19,20 @@ services:
integration-tests:
image: swift-nio:18.04-5.0
environment:
- MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=38750
- MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=698050
- MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=36750
- MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=691050
- MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4600
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=3150
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2100
- MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=99100

test:
image: swift-nio:18.04-5.0
command: /bin/bash -cl "swift test -Xswiftc -warnings-as-errors -Xswiftc -DNIO_CI_BUILD && ./scripts/integration_tests.sh"
environment:
- MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=38750
- MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=698050
- MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=36750
- MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=691050
- MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4600
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=3150
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2100
- MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=99100

echo:
Expand Down

0 comments on commit 58a58b9

Please sign in to comment.