profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/AlanQuatermain/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Jim Dovey AlanQuatermain LinkedIn Santa Clara, CA http://alanquatermain.me/ 20-year veteran software engineer. British, in California. Early member of the watchOS team at Apple, now designing APIs at LinkedIn. Master of ObjC and Swift.

AlanQuatermain/AQGridView 2409

A grid view for iPhone/iPad, designed to look similar to NSCollectionView.

AlanQuatermain/aqtoolkit 791

A toolkit consisting of a bunch of generally useful routines and extensions I wrote when putting together other projects.

adrianco/Actors-for-Netflix-on-iPad 111

iPad app that navigates the Netflix catalog by Actor using the OData API and calls the Netflix Player to watch a movie. Winner of best use of Web API's prize at the iPadDevCamp. Code is stable and functional, but unfinished

AlanQuatermain/AQUI 109

A collection of SwiftUI views and utilities.

AlanQuatermain/AQAppStateMachine 88

An application state machine, based on matching values within bitfields to trigger actions supplied using Blocks.

AlanQuatermain/AQSocket 49

Trying out some asynchronous socket-level APIs using dispatch IO on iOS 5.

AlanQuatermain/AQSelfRotatingViewController 39

A UIViewController subclass which implements its own auto-rotation logic, so its view can be placed directly into a UIWindow above other views.

AlanQuatermain/appencryptor 38

A command-line tool to apply or remove Apple Binary Protection from an application.

AlanQuatermain/AQStreamDownloader 16

A simple class to download a stream to disk or to a memory block

AlanQuatermain/DownloadDarwinSource 15

An Automator workflow to download and extract the complete open source code of any OS X system release.

pull request commentapple/swift-nio

implement CircularBuffer.first: to prevent allocs

#1801 is now green (I cherry-picked this commit in there). This should prove that this actually works (but I've also manually verified on my Mac where the allocs also go back to 2).

weissi

comment created time in 19 minutes

pull request commentapple/swift-nio

Added second implementation of liburing as discussed in #1761.

@weissi , no worries, I am following those sagas :-) Will sort it out when you are ready.

hassila

comment created time in 22 minutes

pull request commentapple/swift-nio

Added second implementation of liburing as discussed in #1761.

@hassila apologies this is taking so long. I wanted to get https://github.com/apple/swift-nio/pull/1801 first in which requires https://github.com/apple/swift-nio/pull/1807 but that showed a problem in the compiler which lead to https://bugs.swift.org/browse/SR-14516 and then https://github.com/apple/swift-nio/pull/1814 as a workaround (which hopefully works).

hassila

comment created time in 25 minutes

PR opened apple/swift-nio

implement CircularBuffer.first: to prevent allocs

Motivation:

Due to https://bugs.swift.org/browse/SR-14516 , we sometimes get allocating (!?) subscript.read accessors in the CircularBuffer.first depending on the Element type...

Modifications:

Implement CircularBuffer.first instead of inheriting it from Collection.

Result:

Fewer allocs in some cases.

+32 -0

0 comment

3 changed files

pr created time in 32 minutes

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with 16MiB + 1 byte+        let inputBufferLength = 16 * 1024 * 1024 + 1+        var inputBuffer = ByteBufferAllocator().buffer(capacity: inputBufferLength)+        inputBuffer.writeRepeatingByte(1, count: 8)+        inputBuffer.writeRepeatingByte(2, count: inputBufferLength - 9)+        inputBuffer.writeRepeatingByte(3, count: 1)+        // read a small slice from the inputBuffer, to create an offset of eight bytes+        XCTAssertEqual(inputBuffer.readInteger(as: UInt64.self), 0x0101010101010101)+        +        // read the remaining bytes into a new slice (this will have a length of 16MiB - 7Bbytes)+        let remainingSliceLength = inputBufferLength - 8+        XCTAssertEqual(inputBuffer.readableBytes, remainingSliceLength)+        var remainingSlice = inputBuffer.readSlice(length: remainingSliceLength)!+        +        let finalSliceLength = 1+        // let's create a new buffer that uses all but one byte+        XCTAssertEqual(remainingSlice.readBytes(length: remainingSliceLength - finalSliceLength), [UInt8](repeating: 2, count: remainingSliceLength - finalSliceLength))
        XCTAssertEqual(remainingSlice.readBytes(length: remainingSliceLength - finalSliceLength),
                       Array<UInt8>(repeating: 2, count: remainingSliceLength - finalSliceLength))
fabianfett

comment created time in an hour

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 public struct ByteBuffer {             // the slice's begin is past the maximum supported slice begin value (16 MiB) so the only option we have

fair

fabianfett

comment created time in an hour

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with 16MiB + 1 byte+        let inputBufferLength = 16 * 1024 * 1024 + 1+        var inputBuffer = ByteBuffer.Allocator().buffer(capacity: inputBufferLength)
        var inputBuffer = ByteBufferAllocator().buffer(capacity: inputBufferLength)
fabianfett

comment created time in 2 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 public struct ByteBuffer {             // the slice's begin is past the maximum supported slice begin value (16 MiB) so the only option we have

It is also used after the guard condition in L651.

fabianfett

comment created time in 15 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 public struct ByteBuffer {             // the slice's begin is past the maximum supported slice begin value (16 MiB) so the only option we have

There's almost no correct way to use the sliceStartIndex variable. I wonder if it would be nicer to eliminate it and put it straight into the condition. Ie.

guard self._slice.lowerBound + index <= ByteBuffer.Slice.maxSupportedLowerBound else
fabianfett

comment created time in 15 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with (16MiB - 1byte) + 2 bytes = 16MiB + 1 byte+        let inputBufferLength = Int(_UInt24.max) + 2+        var inputBuffer = ByteBuffer(repeating: 1, count: inputBufferLength)+        // read a small slice from the inputBuffer, to create an offset of eight bytes+        XCTAssertNotNil(inputBuffer.readInteger(as: UInt64.self))+        +        // read the remaining bytes into a new slice (this will have a length of 16MiB - 7Bbytes)+        let remainingSliceLength = inputBufferLength - MemoryLayout<UInt64>.size+        var remainingSlice = inputBuffer.readSlice(length: remainingSliceLength)!+        +        let finalSliceLength = 1+        // let's create a new buffer that uses all but one byte+        XCTAssertNotNil(remainingSlice.readSlice(length: remainingSliceLength - finalSliceLength))+        +        // there should only be one byte left.+        XCTAssertEqual(remainingSlice.readableBytes, finalSliceLength)+        +        // the upper bound is exactly one byte above the 16MiB threshold. For this reason a slice+        // of the last byte, will need to get a new backing storage.+        XCTAssertEqual(remainingSlice._slice.upperBound, UInt32(_UInt24.max) + 2)+        let finalSlice = remainingSlice.readSlice(length: finalSliceLength)+        XCTAssertEqual(finalSlice?.storageCapacity, 1)+        XCTAssertEqual(finalSlice?._slice.lowerBound, 0)+        

we should additionally assert

  • that the slices/values read have the correct content (1s, 2s, and 3s or so as suggested above)
  • that the underlying storage has indeed changed. There's a (test only) property called buffer.storageIdentifier or so which stays the same if nothing got reallocated/copied and changes if it has
fabianfett

comment created time in 15 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with (16MiB - 1byte) + 2 bytes = 16MiB + 1 byte+        let inputBufferLength = Int(_UInt24.max) + 2+        var inputBuffer = ByteBuffer(repeating: 1, count: inputBufferLength)+        // read a small slice from the inputBuffer, to create an offset of eight bytes+        XCTAssertNotNil(inputBuffer.readInteger(as: UInt64.self))+        +        // read the remaining bytes into a new slice (this will have a length of 16MiB - 7Bbytes)+        let remainingSliceLength = inputBufferLength - MemoryLayout<UInt64>.size+        var remainingSlice = inputBuffer.readSlice(length: remainingSliceLength)!+        +        let finalSliceLength = 1+        // let's create a new buffer that uses all but one byte+        XCTAssertNotNil(remainingSlice.readSlice(length: remainingSliceLength - finalSliceLength))+        +        // there should only be one byte left.+        XCTAssertEqual(remainingSlice.readableBytes, finalSliceLength)+        +        // the upper bound is exactly one byte above the 16MiB threshold. For this reason a slice+        // of the last byte, will need to get a new backing storage.+        XCTAssertEqual(remainingSlice._slice.upperBound, UInt32(_UInt24.max) + 2)

please don't access _things here, they're meant to be private, just not private because inlining

fabianfett

comment created time in 15 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with (16MiB - 1byte) + 2 bytes = 16MiB + 1 byte+        let inputBufferLength = Int(_UInt24.max) + 2+        var inputBuffer = ByteBuffer(repeating: 1, count: inputBufferLength)

Let's prepare the buffer with a different byte pattern so that we can prove at the end that we read the correct one. For example:

  • 8 1s (which will be read in the readInteger)
  • 16 MB - 6 (?) 2s (which will be read in the readSlice)
  • 1 3 (which will be the leftovers aka the "final slice")
fabianfett

comment created time in 15 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with (16MiB - 1byte) + 2 bytes = 16MiB + 1 byte+        let inputBufferLength = Int(_UInt24.max) + 2+        var inputBuffer = ByteBuffer(repeating: 1, count: inputBufferLength)+        // read a small slice from the inputBuffer, to create an offset of eight bytes+        XCTAssertNotNil(inputBuffer.readInteger(as: UInt64.self))+        +        // read the remaining bytes into a new slice (this will have a length of 16MiB - 7Bbytes)+        let remainingSliceLength = inputBufferLength - MemoryLayout<UInt64>.size

shouldn't this be equal to readableBytes - 1? We could assert that

fabianfett

comment created time in 15 hours

Pull request review commentapple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

 class ByteBufferTest: XCTestCase {         XCTAssertEqual(0xcc, slice.getInteger(at: 0, as: UInt8.self))         XCTAssertEqual(0xdd, slice.getInteger(at: slice.writerIndex - 1, as: UInt8.self))     }+    +    func testSliceOnSliceAfterHitting16MBMark() {+        // This test ensures that a slice will get a new backing storage if its start is more than+        // 16MiB after the originating backing storage.+        +        // create a buffer with (16MiB - 1byte) + 2 bytes = 16MiB + 1 byte+        let inputBufferLength = Int(_UInt24.max) + 2

Just hardcode the value here. The _ means that _UInt24 is meant to be private. So let inputBufferLength = 1 << 24 + 1 or similar.

fabianfett

comment created time in 15 hours

PR opened apple/swift-nio

Fix crash: Create ByteBuffer Slice from ByteBuffer Slice after 16MB

Fixes an issue that was raised in https://github.com/vapor/postgres-nio/issues/148

+33 -2

0 comment

2 changed files

pr created time in 15 hours

issue commentapple/swift-nio-transport-services

NIOTS doesn't let you control the equivalent of `maxMessagesPerRead` and `recvAllocator`

@Lukasa Thanks! Will take a look tomorrow morning.

weissi

comment created time in 16 hours

issue commentapple/swift-nio-transport-services

NIOTS doesn't let you control the equivalent of `maxMessagesPerRead` and `recvAllocator`

Yup, that's exactly what it means.

In principle the mechanism to implement it should be simply to call .receive multiple times. I'm not 100% confident the code will handle that well, but that's how I'd go about starting out.

weissi

comment created time in 17 hours

issue commentapple/swift-nio-transport-services

NIOTS doesn't let you control the equivalent of `maxMessagesPerRead` and `recvAllocator`

@weissi It's looking like I may need maxMessagesPerRead after all (if I'm understanding it correctly).

Does it refers to the number of messages an InboundChannelHandler will receive from a read call before needing to call read again? i.e. setting maxMessagesPerRead to 1 would mean an InboundChannelHandler needs to call read for each message?

If that's right... I'd love a suggestion on how to implement it.

Cheers!

weissi

comment created time in 19 hours

push eventapple/swift-nio

Johannes Weiss

commit sha 4d1a72c7122d255bf440b00925947efd4b3e1a84

alloc-limits-from-test-output: support more formats (#1812) Motivation: The dev/alloc-limits-from-test-output script is handy to get correctly formatted (and sorted) alloc counter limits from test output. Modifications: When running the alloc counter script itself, it outputs suggested `export MAX_ALLOCS_ALLOWED` lines. We're now also parsing those, so you can easily go from `export ...*` to the docker-compose form :). Result: Even easier alloc counter limits.

view details

push time in 20 hours

PR merged apple/swift-nio

alloc-limits-from-test-output: support more formats needs-no-version-bump

Motivation:

The dev/alloc-limits-from-test-output script is handy to get correctly formatted (and sorted) alloc counter limits from test output.

Modifications:

When running the alloc counter script itself, it outputs suggested export MAX_ALLOCS_ALLOWED lines. We're now also parsing those, so you can easily go from export ...* to the docker-compose form :).

Result:

Even easier alloc counter limits.

+8 -6

0 comment

1 changed file

weissi

pr closed time in 20 hours

PR opened apple/swift-nio

Reviewers
alloc-limits-from-test-output: support more formats

Motivation:

The dev/alloc-limits-from-test-output script is handy to get correctly formatted (and sorted) alloc counter limits from test output.

Modifications:

When running the alloc counter script itself, it outputs suggested export MAX_ALLOCS_ALLOWED lines. We're now also parsing those, so you can easily go from export ...* to the docker-compose form :).

Result:

Even easier alloc counter limits.

+8 -6

0 comment

1 changed file

pr created time in 21 hours

pull request commentapple/swift-nio

generic integer bit packing

<h2>performance report</h2> <p>build id: 68</p> <p>timestamp: Wed Apr 21 12:25:38 UTC 2021</p> <h4>results</h4> <table border="1"> <tr><td>name</td><td>min</td><td>max</td><td>mean</td><td>std</td></tr> <tr> <td>write_http_headers</td> <td>0.0042712</td> <td>0.004289125</td> <td>0.00427606</td> <td>5.240430537868372e-06</td> </tr> <tr> <td>bytebuffer_write_12MB_short_string_literals</td> <td>0.516237341</td> <td>0.522630067</td> <td>0.5179217687000001</td> <td>0.0017973585644828515</td> </tr> <tr> <td>bytebuffer_write_12MB_short_calculated_strings</td> <td>0.514475723</td> <td>0.517565453</td> <td>0.5152690316999999</td> <td>0.0008741452424900675</td> </tr> <tr> <td>bytebuffer_write_12MB_medium_string_literals</td> <td>0.18178997</td> <td>0.184271263</td> <td>0.1829605956</td> <td>0.00095546179101128</td> </tr> <tr> <td>bytebuffer_write_12MB_medium_calculated_strings</td> <td>0.23036704</td> <td>0.232131899</td> <td>0.23134882150000005</td> <td>0.000530695711813018</td> </tr> <tr> <td>bytebuffer_write_12MB_large_calculated_strings</td> <td>0.196440443</td> <td>0.19724908</td> <td>0.1969375724</td> <td>0.0002986300801881111</td> </tr> <tr> <td>bytebuffer_lots_of_rw</td> <td>0.564493897</td> <td>0.565981614</td> <td>0.5651232789</td> <td>0.00044779209677347115</td> </tr> <tr> <td>bytebuffer_write_http_response_ascii_only_as_string</td> <td>0.041219095</td> <td>0.041863321</td> <td>0.0414025914</td> <td>0.00023236815621298533</td> </tr> <tr> <td>bytebuffer_write_http_response_ascii_only_as_staticstring</td> <td>0.032028126</td> <td>0.032655782</td> <td>0.0321696794</td> <td>0.00017549814661205668</td> </tr> <tr> <td>bytebuffer_write_http_response_some_nonascii_as_string</td> <td>0.041559557</td> <td>0.042133194</td> <td>0.0417465293</td> <td>0.00022181910380009487</td> </tr> <tr> <td>bytebuffer_write_http_response_some_nonascii_as_staticstring</td> <td>0.032231018</td> <td>0.032716878</td> <td>0.032317929100000004</td> <td>0.00014197229716113956</td> </tr> <tr> <td>no-net_http1_10k_reqs_1_conn</td> <td>0.143644206</td> <td>0.145565625</td> <td>0.14421102759999999</td> <td>0.0005897192656719887</td> </tr> <tr> <td>http1_10k_reqs_1_conn</td> <td>0.626267928</td> <td>0.63200212</td> <td>0.6290522422</td> <td>0.0019596063146177897</td> </tr> <tr> <td>http1_10k_reqs_100_conns</td> <td>0.627018054</td> <td>0.6315076</td> <td>0.6293843999</td> <td>0.0012325572980832517</td> </tr> <tr> <td>future_whenallsucceed_100k_immediately_succeeded_off_loop</td> <td>0.093953415</td> <td>0.095050987</td> <td>0.0945476661</td> <td>0.0003888829629968524</td> </tr> <tr> <td>future_whenallsucceed_100k_immediately_succeeded_on_loop</td> <td>0.094127554</td> <td>0.101581995</td> <td>0.095507503</td> <td>0.0021978449897864833</td> </tr> <tr> <td>future_whenallsucceed_100k_deferred_off_loop</td> <td>0.418695867</td> <td>0.427100981</td> <td>0.4235566561</td> <td>0.0030220532000039156</td> </tr> <tr> <td>future_whenallsucceed_100k_deferred_on_loop</td> <td>0.1483939</td> <td>0.15127964</td> <td>0.1493099906</td> <td>0.0007702931142473835</td> </tr> <tr> <td>future_whenallcomplete_100k_immediately_succeeded_off_loop</td> <td>0.034782138</td> <td>0.035890835</td> <td>0.035213652299999995</td> <td>0.00028802646532453415</td> </tr> <tr> <td>future_whenallcomplete_100k_immediately_succeeded_on_loop</td> <td>0.035829359</td> <td>0.036780049</td> <td>0.036275508899999996</td> <td>0.0003217378329480391</td> </tr> <tr> <td>future_whenallcomplete_100k_deferred_off_loop</td> <td>0.312878741</td> <td>0.321523981</td> <td>0.31756961229999997</td> <td>0.0032724693612542883</td> </tr> <tr> <td>future_whenallcomplete_100k_deferred_on_loop</td> <td>0.074028169</td> <td>0.079040242</td> <td>0.07483563039999999</td> <td>0.0014958468662512204</td> </tr> <tr> <td>future_reduce_10k_futures</td> <td>0.039492264</td> <td>0.040096055</td> <td>0.039793071099999994</td> <td>0.00018372787973670298</td> </tr> <tr> <td>future_reduce_into_10k_futures</td> <td>0.038088643</td> <td>0.038864197</td> <td>0.038391494</td> <td>0.00020055372513729276</td> </tr> <tr> <td>channel_pipeline_1m_events</td> <td>0.171821312</td> <td>0.172003669</td> <td>0.1719653125</td> <td>5.38974801106452e-05</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_1m_frames_cow</td> <td>0.826269574</td> <td>0.826779523</td> <td>0.8264754133000001</td> <td>0.0001502174943252186</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_1m_frames_cow_masking</td> <td>0.094694841</td> <td>0.096547166</td> <td>0.0955317857</td> <td>0.000572368974382599</td> </tr> <tr> <td>websocket_encode_1kb_space_at_front_100k_frames_cow</td> <td>0.085659727</td> <td>0.086050454</td> <td>0.0858187668</td> <td>0.00019184880757443552</td> </tr> <tr> <td>websocket_encode_50b_no_space_at_front_1m_frames_cow</td> <td>0.82653888</td> <td>0.827142597</td> <td>0.8267868220000001</td> <td>0.00020884318501476962</td> </tr> <tr> <td>websocket_encode_1kb_no_space_at_front_100k_frames_cow</td> <td>0.085471046</td> <td>0.085931526</td> <td>0.08568857360000001</td> <td>0.0002090989485871849</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_10k_frames</td> <td>0.01110475</td> <td>0.011125076</td> <td>0.0111153002</td> <td>6.3747312588232345e-06</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_10k_frames_masking</td> <td>0.121696859</td> <td>0.123026011</td> <td>0.12233193070000001</td> <td>0.000454850588249971</td> </tr> <tr> <td>websocket_encode_1kb_space_at_front_1k_frames</td> <td>0.001990167</td> <td>0.00200148</td> <td>0.0019943595</td> <td>3.3439010900443322e-06</td> </tr> <tr> <td>websocket_encode_50b_no_space_at_front_10k_frames</td> <td>0.011004686</td> <td>0.011393231</td> <td>0.0110510809</td> <td>0.00012042073269947252</td> </tr> <tr> <td>websocket_encode_1kb_no_space_at_front_1k_frames</td> <td>0.002001406</td> <td>0.002011974</td> <td>0.0020042461</td> <td>3.583430958360086e-06</td> </tr> <tr> <td>websocket_decode_125b_100k_frames</td> <td>0.144967101</td> <td>0.147091558</td> <td>0.1457347548</td> <td>0.0006168761595683026</td> </tr> <tr> <td>websocket_decode_125b_with_a_masking_key_100k_frames</td> <td>0.151638795</td> <td>0.153257941</td> <td>0.15250309220000002</td> <td>0.0005383655283105269</td> </tr> <tr> <td>websocket_decode_64kb_100k_frames</td> <td>0.152670795</td> <td>0.153538789</td> <td>0.15314238279999998</td> <td>0.00028053864493379386</td> </tr> <tr> <td>websocket_decode_64kb_with_a_masking_key_100k_frames</td> <td>0.159366158</td> <td>0.160178177</td> <td>0.15962710219999998</td> <td>0.0002501936963367012</td> </tr> <tr> <td>websocket_decode_64kb_+1_100k_frames</td> <td>0.152485437</td> <td>0.153869661</td> <td>0.1531812747</td> <td>0.0004520034598621381</td> </tr> <tr> <td>websocket_decode_64kb_+1_with_a_masking_key_100k_frames</td> <td>0.159865475</td> <td>0.161083051</td> <td>0.160310011</td> <td>0.00037782767893225326</td> </tr> <tr> <td>circular_buffer_into_byte_buffer_1kb</td> <td>0.046948025</td> <td>0.047384632</td> <td>0.0470508691</td> <td>0.00017370952218859317</td> </tr> <tr> <td>circular_buffer_into_byte_buffer_1mb</td> <td>0.094027653</td> <td>0.094513031</td> <td>0.09422605170000001</td> <td>0.00021999465536288082</td> </tr> <tr> <td>byte_buffer_view_iterator_1mb</td> <td>0.135080669</td> <td>0.135954584</td> <td>0.1355401487</td> <td>0.00029118920626784923</td> </tr> <tr> <td>byte_to_message_decoder_decode_many_small</td> <td>2.9e-08</td> <td>4.9e-08</td> <td>3.2799999999999996e-08</td> <td>6.1064628786957265e-09</td> </tr> </table> <h4>comparison</h4> <table border="1"> <tr> <td>name</td> <td>current</td> <td>previous</td> <td>winner</td> <td>diff</td> </tr> <tr> <td>write_http_headers</td> <td>0.0042712</td> <td>0.004270197</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>bytebuffer_write_12MB_short_string_literals</td> <td>0.516237341</td> <td>0.520151808</td> <td>current</td> <td>0%</td> </tr> <tr> <td>bytebuffer_write_12MB_short_calculated_strings</td> <td>0.514475723</td> <td>0.518006771</td> <td>current</td> <td>0%</td> </tr> <tr> <td>bytebuffer_write_12MB_medium_string_literals</td> <td>0.18178997</td> <td>0.182949802</td> <td>current</td> <td>0%</td> </tr> <tr> <td>bytebuffer_write_12MB_medium_calculated_strings</td> <td>0.23036704</td> <td>0.258699621</td> <td>current</td> <td>-10%</td> </tr> <tr> <td>bytebuffer_write_12MB_large_calculated_strings</td> <td>0.196440443</td> <td>0.197871073</td> <td>current</td> <td>0%</td> </tr> <tr> <td>bytebuffer_lots_of_rw</td> <td>0.564493897</td> <td>0.562406443</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>bytebuffer_write_http_response_ascii_only_as_string</td> <td>0.041219095</td> <td>0.041208875</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>bytebuffer_write_http_response_ascii_only_as_staticstring</td> <td>0.032028126</td> <td>0.03115203</td> <td>previous</td> <td>2%</td> </tr> <tr> <td>bytebuffer_write_http_response_some_nonascii_as_string</td> <td>0.041559557</td> <td>0.041045838</td> <td>previous</td> <td>1%</td> </tr> <tr> <td>bytebuffer_write_http_response_some_nonascii_as_staticstring</td> <td>0.032231018</td> <td>0.031158652</td> <td>previous</td> <td>3%</td> </tr> <tr> <td>no-net_http1_10k_reqs_1_conn</td> <td>0.143644206</td> <td>0.142761228</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>http1_10k_reqs_1_conn</td> <td>0.626267928</td> <td>0.621893705</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>http1_10k_reqs_100_conns</td> <td>0.627018054</td> <td>0.626939748</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>future_whenallsucceed_100k_immediately_succeeded_off_loop</td> <td>0.093953415</td> <td>0.091862767</td> <td>previous</td> <td>2%</td> </tr> <tr> <td>future_whenallsucceed_100k_immediately_succeeded_on_loop</td> <td>0.094127554</td> <td>0.091975462</td> <td>previous</td> <td>2%</td> </tr> <tr> <td>future_whenallsucceed_100k_deferred_off_loop</td> <td>0.418695867</td> <td>0.41994535</td> <td>current</td> <td>0%</td> </tr> <tr> <td>future_whenallsucceed_100k_deferred_on_loop</td> <td>0.1483939</td> <td>0.14633541</td> <td>previous</td> <td>1%</td> </tr> <tr> <td>future_whenallcomplete_100k_immediately_succeeded_off_loop</td> <td>0.034782138</td> <td>0.03527479</td> <td>current</td> <td>-1%</td> </tr> <tr> <td>future_whenallcomplete_100k_immediately_succeeded_on_loop</td> <td>0.035829359</td> <td>0.036100421</td> <td>current</td> <td>0%</td> </tr> <tr> <td>future_whenallcomplete_100k_deferred_off_loop</td> <td>0.312878741</td> <td>0.318715825</td> <td>current</td> <td>-1%</td> </tr> <tr> <td>future_whenallcomplete_100k_deferred_on_loop</td> <td>0.074028169</td> <td>0.073735254</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>future_reduce_10k_futures</td> <td>0.039492264</td> <td>0.040213272</td> <td>current</td> <td>-1%</td> </tr> <tr> <td>future_reduce_into_10k_futures</td> <td>0.038088643</td> <td>0.03863997</td> <td>current</td> <td>-1%</td> </tr> <tr> <td>channel_pipeline_1m_events</td> <td>0.171821312</td> <td>0.172092663</td> <td>current</td> <td>0%</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_1m_frames_cow</td> <td>0.826269574</td> <td>0.827476886</td> <td>current</td> <td>0%</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_1m_frames_cow_masking</td> <td>0.094694841</td> <td>0.091910753</td> <td>previous</td> <td>3%</td> </tr> <tr> <td>websocket_encode_1kb_space_at_front_100k_frames_cow</td> <td>0.085659727</td> <td>0.085026652</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_encode_50b_no_space_at_front_1m_frames_cow</td> <td>0.82653888</td> <td>0.831885486</td> <td>current</td> <td>0%</td> </tr> <tr> <td>websocket_encode_1kb_no_space_at_front_100k_frames_cow</td> <td>0.085471046</td> <td>0.085313103</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_10k_frames</td> <td>0.01110475</td> <td>0.011045597</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_encode_50b_space_at_front_10k_frames_masking</td> <td>0.121696859</td> <td>0.11903173</td> <td>previous</td> <td>2%</td> </tr> <tr> <td>websocket_encode_1kb_space_at_front_1k_frames</td> <td>0.001990167</td> <td>0.001990404</td> <td>current</td> <td>0%</td> </tr> <tr> <td>websocket_encode_50b_no_space_at_front_10k_frames</td> <td>0.011004686</td> <td>0.010938877</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_encode_1kb_no_space_at_front_1k_frames</td> <td>0.002001406</td> <td>0.001997754</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_decode_125b_100k_frames</td> <td>0.144967101</td> <td>0.144509473</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_decode_125b_with_a_masking_key_100k_frames</td> <td>0.151638795</td> <td>0.150672267</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_decode_64kb_100k_frames</td> <td>0.152670795</td> <td>0.151501145</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_decode_64kb_with_a_masking_key_100k_frames</td> <td>0.159366158</td> <td>0.157971633</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_decode_64kb_+1_100k_frames</td> <td>0.152485437</td> <td>0.151206951</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>websocket_decode_64kb_+1_with_a_masking_key_100k_frames</td> <td>0.159865475</td> <td>0.157565339</td> <td>previous</td> <td>1%</td> </tr> <tr> <td>circular_buffer_into_byte_buffer_1kb</td> <td>0.046948025</td> <td>0.046944818</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>circular_buffer_into_byte_buffer_1mb</td> <td>0.094027653</td> <td>0.094020786</td> <td>previous</td> <td>0%</td> </tr> <tr> <td>byte_buffer_view_iterator_1mb</td> <td>0.135080669</td> <td>0.135215358</td> <td>current</td> <td>0%</td> </tr> <tr> <td>byte_to_message_decoder_decode_many_small</td> <td>2.9e-08</td> <td>3.0e-08</td> <td>current</td> <td>-3%</td> </tr> </table> <p style="color: red">significant differences found</p>

weissi

comment created time in a day

pull request commentapple/swift-nio

generic integer bit packing

@swift-nio-bot test perf please

weissi

comment created time in a day

push eventapple/swift-nio

Johannes Weiss

commit sha 52c41b100512724ac6b459d6c96959b9e53924d2

fix compilation on Ubuntu 14.04 and other old Linuxes (#1810) Motivation: Glibc (in Sep 2014) changed the first parameter of `eventfd` from `int` to `unsigned int` (which we assume since recently). Modifications: Make the code work with `int` and `unsigned int`. Result: Compiles again on 14.04.

view details

push time in a day

PR merged apple/swift-nio

fix compilation on Ubuntu 14.04 and other old Linuxes patch-version-bump-only

Motivation:

Glibc (in Sep 2014) changed the first parameter of eventfd from int to unsigned int (which we assume since recently).

Modifications:

Make the code work with int and unsigned int.

Result:

Compiles again on 14.04.

+5 -1

1 comment

1 changed file

weissi

pr closed time in a day

issue commentapple/swift-nio-transport-services

NIOTS doesn't let you control the equivalent of `maxMessagesPerRead` and `recvAllocator`

@edwellbrook totally up to you. I fully understand if you can't budget the time. Ping me if you'd like an explanation of what it does exactly and how we could implement it.

weissi

comment created time in a day

issue commentapple/swift-nio-transport-services

NIOTS doesn't let you control the equivalent of `maxMessagesPerRead` and `recvAllocator`

Unfortunately I don't have much need for maxMessagesPerRead so I can't budget the time for it right now. If my existing PR needs updating I might be able to quickly fit this in though!

Not super familiar with maxMessagesPerRead so would need a suggestion on how it's supposed to work and should be implemented.

weissi

comment created time in 2 days

issue commentapple/swift-nio

WebSocket continuation (Fragmentation)

Thank you for your quick response! I will implement it and open a PR.

dnadoba

comment created time in 2 days

issue commentapple/swift-nio

WebSocket continuation (Fragmentation)

Nope, SwiftNIO does not provide such a thing. If you wanted to implement it we'd be more than happy to accept the patch.

dnadoba

comment created time in 2 days