diff --git a/IntegrationTests/tests_04_performance/Thresholds/5.10.json b/IntegrationTests/tests_04_performance/Thresholds/5.10.json index 5707d9e61..67874b65a 100644 --- a/IntegrationTests/tests_04_performance/Thresholds/5.10.json +++ b/IntegrationTests/tests_04_performance/Thresholds/5.10.json @@ -1,51 +1,50 @@ { - "10000000_asyncsequenceproducer": 21, - "1000000_asyncwriter": 1000050, - "1000_addHandlers": 44050, - "1000_addHandlers_sync": 37050, - "1000_addRemoveHandlers_handlercontext": 8050, - "1000_addRemoveHandlers_handlername": 8050, - "1000_addRemoveHandlers_handlertype": 8050, - "1000_autoReadGetAndSet": 18050, + "10000000_asyncsequenceproducer": 19, + "1000000_asyncwriter": 1000013, + "1000_addHandlers": 43000, + "1000_addHandlers_sync": 36000, + "1000_addRemoveHandlers_handlercontext": 8032, + "1000_addRemoveHandlers_handlername": 8032, + "1000_addRemoveHandlers_handlertype": 8032, + "1000_autoReadGetAndSet": 18000, "1000_autoReadGetAndSet_sync": 0, - "1000_copying_bytebufferview_to_array": 1050, - "1000_copying_circularbuffer_to_array": 1050, - "1000_getHandlers": 8050, - "1000_getHandlers_sync": 36, - "1000_reqs_1_conn": 26400, - "1000_rst_connections": 145050, - "1000_tcpbootstraps": 3050, - "1000_tcpconnections": 152050, - "1000_udp_reqs": 6050, - "1000_udpbootstraps": 2050, - "1000_udpconnections": 75050, + "1000_copying_bytebufferview_to_array": 1000, + "1000_copying_circularbuffer_to_array": 1000, + "1000_getHandlers": 8034, + "1000_getHandlers_sync": 34, + "1000_reqs_1_conn": 26363, + "1000_rst_connections": 145004, + "1000_tcpbootstraps": 3001, + "1000_tcpconnections": 152002, + "1000_udp_reqs": 6014, + "1000_udpbootstraps": 2000, + "1000_udpconnections": 75008, "1_reqs_1000_conn": 389000, - "bytebuffer_lots_of_rw": 2050, + "bytebuffer_lots_of_rw": 2005, "creating_10000_headers": 0, - "decode_1000_ws_frames": 2050, + "decode_1000_ws_frames": 2000, "encode_1000_ws_frames_holding_buffer": 3, - "encode_1000_ws_frames_holding_buffer_with_mask": 2050, + "encode_1000_ws_frames_holding_buffer_with_mask": 2003, "encode_1000_ws_frames_holding_buffer_with_space": 3, - "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2050, - "encode_1000_ws_frames_new_buffer": 3050, - "encode_1000_ws_frames_new_buffer_with_mask": 5050, - "encode_1000_ws_frames_new_buffer_with_space": 3050, - "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5050, + "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2003, + "encode_1000_ws_frames_new_buffer": 3000, + "encode_1000_ws_frames_new_buffer_with_mask": 5000, + "encode_1000_ws_frames_new_buffer_with_space": 3000, + "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5000, "execute_hop_10000_tasks": 0, - "future_erase_result": 4050, - "future_lots_of_callbacks": 53050, - "get_100000_headers_canonical_form": 700050, - "get_100000_headers_canonical_form_trimming_whitespace": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700050, + "future_erase_result": 4001, + "future_lots_of_callbacks": 53001, + "get_100000_headers_canonical_form": 700000, + "get_100000_headers_canonical_form_trimming_whitespace": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700000, "modifying_1000_circular_buffer_elements": 0, - "modifying_byte_buffer_view": 6050, + "modifying_byte_buffer_view": 6000, "ping_pong_1000_reqs_1_conn": 319, - "read_10000_chunks_from_file": 110200, - "schedule_10000_tasks": 40100, - "schedule_and_run_10000_tasks": 50050, + "read_10000_chunks_from_file": 110009, + "schedule_10000_tasks": 40084, + "schedule_and_run_10000_tasks": 50010, "scheduling_10000_executions": 89, - "udp_1000_reqs_1_conn": 6200, - "udp_1_reqs_1000_conn": 162050 + "udp_1000_reqs_1_conn": 6156, + "udp_1_reqs_1000_conn": 162000 } - \ No newline at end of file diff --git a/IntegrationTests/tests_04_performance/Thresholds/5.8.json b/IntegrationTests/tests_04_performance/Thresholds/5.8.json index 37b6e9e9a..623b5af86 100644 --- a/IntegrationTests/tests_04_performance/Thresholds/5.8.json +++ b/IntegrationTests/tests_04_performance/Thresholds/5.8.json @@ -1,51 +1,50 @@ { - "10000000_asyncsequenceproducer": 22, - "1000000_asyncwriter": 1000050, - "1000_addHandlers": 44050, - "1000_addHandlers_sync": 37050, - "1000_addRemoveHandlers_handlercontext": 8050, - "1000_addRemoveHandlers_handlername": 8050, - "1000_addRemoveHandlers_handlertype": 8050, - "1000_autoReadGetAndSet": 18050, + "10000000_asyncsequenceproducer": 20, + "1000000_asyncwriter": 1000015, + "1000_addHandlers": 43000, + "1000_addHandlers_sync": 36000, + "1000_addRemoveHandlers_handlercontext": 8032, + "1000_addRemoveHandlers_handlername": 8032, + "1000_addRemoveHandlers_handlertype": 8032, + "1000_autoReadGetAndSet": 18000, "1000_autoReadGetAndSet_sync": 0, - "1000_copying_bytebufferview_to_array": 1050, - "1000_copying_circularbuffer_to_array": 1050, - "1000_getHandlers": 8050, - "1000_getHandlers_sync": 36, - "1000_reqs_1_conn": 26400, - "1000_rst_connections": 147050, - "1000_tcpbootstraps": 4050, - "1000_tcpconnections": 154050, - "1000_udp_reqs": 6050, - "1000_udpbootstraps": 2050, - "1000_udpconnections": 75050, + "1000_copying_bytebufferview_to_array": 1000, + "1000_copying_circularbuffer_to_array": 1000, + "1000_getHandlers": 8034, + "1000_getHandlers_sync": 34, + "1000_reqs_1_conn": 26372, + "1000_rst_connections": 147004, + "1000_tcpbootstraps": 4001, + "1000_tcpconnections": 154002, + "1000_udp_reqs": 6014, + "1000_udpbootstraps": 2000, + "1000_udpconnections": 75008, "1_reqs_1000_conn": 398000, - "bytebuffer_lots_of_rw": 2050, + "bytebuffer_lots_of_rw": 2005, "creating_10000_headers": 0, - "decode_1000_ws_frames": 2050, + "decode_1000_ws_frames": 2000, "encode_1000_ws_frames_holding_buffer": 3, - "encode_1000_ws_frames_holding_buffer_with_mask": 2050, + "encode_1000_ws_frames_holding_buffer_with_mask": 2003, "encode_1000_ws_frames_holding_buffer_with_space": 3, - "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2050, - "encode_1000_ws_frames_new_buffer": 3050, - "encode_1000_ws_frames_new_buffer_with_mask": 5050, - "encode_1000_ws_frames_new_buffer_with_space": 3050, - "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5050, + "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2003, + "encode_1000_ws_frames_new_buffer": 3000, + "encode_1000_ws_frames_new_buffer_with_mask": 5000, + "encode_1000_ws_frames_new_buffer_with_space": 3000, + "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5000, "execute_hop_10000_tasks": 0, - "future_erase_result": 4050, - "future_lots_of_callbacks": 53050, - "get_100000_headers_canonical_form": 700050, - "get_100000_headers_canonical_form_trimming_whitespace": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700050, + "future_erase_result": 4001, + "future_lots_of_callbacks": 53001, + "get_100000_headers_canonical_form": 700000, + "get_100000_headers_canonical_form_trimming_whitespace": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700000, "modifying_1000_circular_buffer_elements": 0, - "modifying_byte_buffer_view": 6050, + "modifying_byte_buffer_view": 6000, "ping_pong_1000_reqs_1_conn": 334, - "read_10000_chunks_from_file": 110200, - "schedule_10000_tasks": 40100, - "schedule_and_run_10000_tasks": 50050, + "read_10000_chunks_from_file": 110009, + "schedule_10000_tasks": 40084, + "schedule_and_run_10000_tasks": 50010, "scheduling_10000_executions": 89, - "udp_1000_reqs_1_conn": 6200, - "udp_1_reqs_1000_conn": 162050 + "udp_1000_reqs_1_conn": 6156, + "udp_1_reqs_1000_conn": 162000 } - \ No newline at end of file diff --git a/IntegrationTests/tests_04_performance/Thresholds/5.9.json b/IntegrationTests/tests_04_performance/Thresholds/5.9.json index fe1bf2c9e..b26451539 100644 --- a/IntegrationTests/tests_04_performance/Thresholds/5.9.json +++ b/IntegrationTests/tests_04_performance/Thresholds/5.9.json @@ -1,51 +1,50 @@ { - "10000000_asyncsequenceproducer": 21, - "1000000_asyncwriter": 1000050, - "1000_addHandlers": 44050, - "1000_addHandlers_sync": 37050, - "1000_addRemoveHandlers_handlercontext": 8050, - "1000_addRemoveHandlers_handlername": 8050, - "1000_addRemoveHandlers_handlertype": 8050, - "1000_autoReadGetAndSet": 18050, + "10000000_asyncsequenceproducer": 19, + "1000000_asyncwriter": 1000013, + "1000_addHandlers": 43000, + "1000_addHandlers_sync": 36000, + "1000_addRemoveHandlers_handlercontext": 8032, + "1000_addRemoveHandlers_handlername": 8032, + "1000_addRemoveHandlers_handlertype": 8032, + "1000_autoReadGetAndSet": 18000, "1000_autoReadGetAndSet_sync": 0, - "1000_copying_bytebufferview_to_array": 1050, - "1000_copying_circularbuffer_to_array": 1050, - "1000_getHandlers": 8050, - "1000_getHandlers_sync": 36, - "1000_reqs_1_conn": 26400, - "1000_rst_connections": 147050, - "1000_tcpbootstraps": 4050, - "1000_tcpconnections": 154050, - "1000_udp_reqs": 6050, - "1000_udpbootstraps": 2050, - "1000_udpconnections": 75050, + "1000_copying_bytebufferview_to_array": 1000, + "1000_copying_circularbuffer_to_array": 1000, + "1000_getHandlers": 8034, + "1000_getHandlers_sync": 34, + "1000_reqs_1_conn": 26372, + "1000_rst_connections": 147004, + "1000_tcpbootstraps": 4001, + "1000_tcpconnections": 154002, + "1000_udp_reqs": 6014, + "1000_udpbootstraps": 2000, + "1000_udpconnections": 75008, "1_reqs_1000_conn": 398000, - "bytebuffer_lots_of_rw": 2050, + "bytebuffer_lots_of_rw": 2005, "creating_10000_headers": 0, - "decode_1000_ws_frames": 2050, + "decode_1000_ws_frames": 2000, "encode_1000_ws_frames_holding_buffer": 3, - "encode_1000_ws_frames_holding_buffer_with_mask": 2050, + "encode_1000_ws_frames_holding_buffer_with_mask": 2003, "encode_1000_ws_frames_holding_buffer_with_space": 3, - "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2050, - "encode_1000_ws_frames_new_buffer": 3050, - "encode_1000_ws_frames_new_buffer_with_mask": 5050, - "encode_1000_ws_frames_new_buffer_with_space": 3050, - "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5050, + "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2003, + "encode_1000_ws_frames_new_buffer": 3000, + "encode_1000_ws_frames_new_buffer_with_mask": 5000, + "encode_1000_ws_frames_new_buffer_with_space": 3000, + "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5000, "execute_hop_10000_tasks": 0, - "future_erase_result": 4050, - "future_lots_of_callbacks": 53050, - "get_100000_headers_canonical_form": 700050, - "get_100000_headers_canonical_form_trimming_whitespace": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700050, + "future_erase_result": 4001, + "future_lots_of_callbacks": 53001, + "get_100000_headers_canonical_form": 700000, + "get_100000_headers_canonical_form_trimming_whitespace": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700000, "modifying_1000_circular_buffer_elements": 0, - "modifying_byte_buffer_view": 6050, + "modifying_byte_buffer_view": 6000, "ping_pong_1000_reqs_1_conn": 334, - "read_10000_chunks_from_file": 110200, - "schedule_10000_tasks": 40100, - "schedule_and_run_10000_tasks": 50050, + "read_10000_chunks_from_file": 110009, + "schedule_10000_tasks": 40084, + "schedule_and_run_10000_tasks": 50010, "scheduling_10000_executions": 89, - "udp_1000_reqs_1_conn": 6200, - "udp_1_reqs_1000_conn": 162050 - } - \ No newline at end of file + "udp_1000_reqs_1_conn": 6156, + "udp_1_reqs_1000_conn": 162000 +} diff --git a/IntegrationTests/tests_04_performance/Thresholds/nightly-6.0.json b/IntegrationTests/tests_04_performance/Thresholds/nightly-6.0.json index 32f5d6112..67874b65a 100644 --- a/IntegrationTests/tests_04_performance/Thresholds/nightly-6.0.json +++ b/IntegrationTests/tests_04_performance/Thresholds/nightly-6.0.json @@ -1,50 +1,50 @@ { "10000000_asyncsequenceproducer": 19, - "1000000_asyncwriter": 1000050, - "1000_addHandlers": 44050, - "1000_addHandlers_sync": 37050, - "1000_addRemoveHandlers_handlercontext": 8050, - "1000_addRemoveHandlers_handlername": 8050, - "1000_addRemoveHandlers_handlertype": 8050, - "1000_autoReadGetAndSet": 18050, + "1000000_asyncwriter": 1000013, + "1000_addHandlers": 43000, + "1000_addHandlers_sync": 36000, + "1000_addRemoveHandlers_handlercontext": 8032, + "1000_addRemoveHandlers_handlername": 8032, + "1000_addRemoveHandlers_handlertype": 8032, + "1000_autoReadGetAndSet": 18000, "1000_autoReadGetAndSet_sync": 0, - "1000_copying_bytebufferview_to_array": 1050, - "1000_copying_circularbuffer_to_array": 1050, - "1000_getHandlers": 8050, - "1000_getHandlers_sync": 35, - "1000_reqs_1_conn": 26400, - "1000_rst_connections": 145050, - "1000_tcpbootstraps": 3050, - "1000_tcpconnections": 152050, - "1000_udp_reqs": 6050, - "1000_udpbootstraps": 2050, - "1000_udpconnections": 75050, - "1_reqs_1000_conn": 389050, - "bytebuffer_lots_of_rw": 2050, + "1000_copying_bytebufferview_to_array": 1000, + "1000_copying_circularbuffer_to_array": 1000, + "1000_getHandlers": 8034, + "1000_getHandlers_sync": 34, + "1000_reqs_1_conn": 26363, + "1000_rst_connections": 145004, + "1000_tcpbootstraps": 3001, + "1000_tcpconnections": 152002, + "1000_udp_reqs": 6014, + "1000_udpbootstraps": 2000, + "1000_udpconnections": 75008, + "1_reqs_1000_conn": 389000, + "bytebuffer_lots_of_rw": 2005, "creating_10000_headers": 0, - "decode_1000_ws_frames": 2050, + "decode_1000_ws_frames": 2000, "encode_1000_ws_frames_holding_buffer": 3, - "encode_1000_ws_frames_holding_buffer_with_mask": 2050, + "encode_1000_ws_frames_holding_buffer_with_mask": 2003, "encode_1000_ws_frames_holding_buffer_with_space": 3, - "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2050, - "encode_1000_ws_frames_new_buffer": 3050, - "encode_1000_ws_frames_new_buffer_with_mask": 5050, - "encode_1000_ws_frames_new_buffer_with_space": 3050, - "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5050, + "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2003, + "encode_1000_ws_frames_new_buffer": 3000, + "encode_1000_ws_frames_new_buffer_with_mask": 5000, + "encode_1000_ws_frames_new_buffer_with_space": 3000, + "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5000, "execute_hop_10000_tasks": 0, - "future_erase_result": 4050, - "future_lots_of_callbacks": 53050, - "get_100000_headers_canonical_form": 700050, - "get_100000_headers_canonical_form_trimming_whitespace": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700050, + "future_erase_result": 4001, + "future_lots_of_callbacks": 53001, + "get_100000_headers_canonical_form": 700000, + "get_100000_headers_canonical_form_trimming_whitespace": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700000, "modifying_1000_circular_buffer_elements": 0, - "modifying_byte_buffer_view": 6050, - "ping_pong_1000_reqs_1_conn": 343, - "read_10000_chunks_from_file": 110200, - "schedule_10000_tasks": 40100, - "schedule_and_run_10000_tasks": 50050, + "modifying_byte_buffer_view": 6000, + "ping_pong_1000_reqs_1_conn": 319, + "read_10000_chunks_from_file": 110009, + "schedule_10000_tasks": 40084, + "schedule_and_run_10000_tasks": 50010, "scheduling_10000_executions": 89, - "udp_1000_reqs_1_conn": 6200, - "udp_1_reqs_1000_conn": 162050 + "udp_1000_reqs_1_conn": 6156, + "udp_1_reqs_1000_conn": 162000 } diff --git a/IntegrationTests/tests_04_performance/Thresholds/nightly-main.json b/IntegrationTests/tests_04_performance/Thresholds/nightly-main.json index 32f5d6112..67874b65a 100644 --- a/IntegrationTests/tests_04_performance/Thresholds/nightly-main.json +++ b/IntegrationTests/tests_04_performance/Thresholds/nightly-main.json @@ -1,50 +1,50 @@ { "10000000_asyncsequenceproducer": 19, - "1000000_asyncwriter": 1000050, - "1000_addHandlers": 44050, - "1000_addHandlers_sync": 37050, - "1000_addRemoveHandlers_handlercontext": 8050, - "1000_addRemoveHandlers_handlername": 8050, - "1000_addRemoveHandlers_handlertype": 8050, - "1000_autoReadGetAndSet": 18050, + "1000000_asyncwriter": 1000013, + "1000_addHandlers": 43000, + "1000_addHandlers_sync": 36000, + "1000_addRemoveHandlers_handlercontext": 8032, + "1000_addRemoveHandlers_handlername": 8032, + "1000_addRemoveHandlers_handlertype": 8032, + "1000_autoReadGetAndSet": 18000, "1000_autoReadGetAndSet_sync": 0, - "1000_copying_bytebufferview_to_array": 1050, - "1000_copying_circularbuffer_to_array": 1050, - "1000_getHandlers": 8050, - "1000_getHandlers_sync": 35, - "1000_reqs_1_conn": 26400, - "1000_rst_connections": 145050, - "1000_tcpbootstraps": 3050, - "1000_tcpconnections": 152050, - "1000_udp_reqs": 6050, - "1000_udpbootstraps": 2050, - "1000_udpconnections": 75050, - "1_reqs_1000_conn": 389050, - "bytebuffer_lots_of_rw": 2050, + "1000_copying_bytebufferview_to_array": 1000, + "1000_copying_circularbuffer_to_array": 1000, + "1000_getHandlers": 8034, + "1000_getHandlers_sync": 34, + "1000_reqs_1_conn": 26363, + "1000_rst_connections": 145004, + "1000_tcpbootstraps": 3001, + "1000_tcpconnections": 152002, + "1000_udp_reqs": 6014, + "1000_udpbootstraps": 2000, + "1000_udpconnections": 75008, + "1_reqs_1000_conn": 389000, + "bytebuffer_lots_of_rw": 2005, "creating_10000_headers": 0, - "decode_1000_ws_frames": 2050, + "decode_1000_ws_frames": 2000, "encode_1000_ws_frames_holding_buffer": 3, - "encode_1000_ws_frames_holding_buffer_with_mask": 2050, + "encode_1000_ws_frames_holding_buffer_with_mask": 2003, "encode_1000_ws_frames_holding_buffer_with_space": 3, - "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2050, - "encode_1000_ws_frames_new_buffer": 3050, - "encode_1000_ws_frames_new_buffer_with_mask": 5050, - "encode_1000_ws_frames_new_buffer_with_space": 3050, - "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5050, + "encode_1000_ws_frames_holding_buffer_with_space_with_mask": 2003, + "encode_1000_ws_frames_new_buffer": 3000, + "encode_1000_ws_frames_new_buffer_with_mask": 5000, + "encode_1000_ws_frames_new_buffer_with_space": 3000, + "encode_1000_ws_frames_new_buffer_with_space_with_mask": 5000, "execute_hop_10000_tasks": 0, - "future_erase_result": 4050, - "future_lots_of_callbacks": 53050, - "get_100000_headers_canonical_form": 700050, - "get_100000_headers_canonical_form_trimming_whitespace": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700050, - "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700050, + "future_erase_result": 4001, + "future_lots_of_callbacks": 53001, + "get_100000_headers_canonical_form": 700000, + "get_100000_headers_canonical_form_trimming_whitespace": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_long_string": 700000, + "get_100000_headers_canonical_form_trimming_whitespace_from_short_string": 700000, "modifying_1000_circular_buffer_elements": 0, - "modifying_byte_buffer_view": 6050, - "ping_pong_1000_reqs_1_conn": 343, - "read_10000_chunks_from_file": 110200, - "schedule_10000_tasks": 40100, - "schedule_and_run_10000_tasks": 50050, + "modifying_byte_buffer_view": 6000, + "ping_pong_1000_reqs_1_conn": 319, + "read_10000_chunks_from_file": 110009, + "schedule_10000_tasks": 40084, + "schedule_and_run_10000_tasks": 50010, "scheduling_10000_executions": 89, - "udp_1000_reqs_1_conn": 6200, - "udp_1_reqs_1000_conn": 162050 + "udp_1000_reqs_1_conn": 6156, + "udp_1_reqs_1000_conn": 162000 } diff --git a/Sources/NIOEmbedded/AsyncTestingEventLoop.swift b/Sources/NIOEmbedded/AsyncTestingEventLoop.swift index 58520c34f..3b9ed67de 100644 --- a/Sources/NIOEmbedded/AsyncTestingEventLoop.swift +++ b/Sources/NIOEmbedded/AsyncTestingEventLoop.swift @@ -95,6 +95,9 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { /// The queue on which we run all our operations. private let queue = DispatchQueue(label: "io.swiftnio.AsyncEmbeddedEventLoop") + private enum State: Int, AtomicValue { case open, closing, closed } + private let state = ManagedAtomic(State.open) + // This function must only be called on queue. private func nextTaskNumber() -> UInt64 { dispatchPrecondition(condition: .onQueue(self.queue)) @@ -150,6 +153,15 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { let promise: EventLoopPromise = self.makePromise() let taskID = self.scheduledTaskCounter.loadThenWrappingIncrement(ordering: .relaxed) + switch self.state.load(ordering: .acquiring) { + case .open: + break + case .closing, .closed: + // If the event loop is shut down, or shutting down, immediately cancel the task. + promise.fail(EventLoopError.cancelled) + return Scheduled(promise: promise, cancellationTask: {}) + } + let scheduled = Scheduled( promise: promise, cancellationTask: { @@ -187,27 +199,7 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { } else { self.queue.async { self.scheduleTask(deadline: self.now, task) - - var tasks = CircularBuffer() - while let nextTask = self.scheduledTasks.peek() { - guard nextTask.readyTime <= self.now else { - break - } - - // Now we want to grab all tasks that are ready to execute at the same - // time as the first. - while let candidateTask = self.scheduledTasks.peek(), candidateTask.readyTime == nextTask.readyTime - { - tasks.append(candidateTask) - self.scheduledTasks.pop() - } - - for task in tasks { - task.task() - } - - tasks.removeAll(keepingCapacity: true) - } + self._run() } } } @@ -233,43 +225,52 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { /// /// - Note: If `deadline` is before the current time, the current time will not be advanced. public func advanceTime(to deadline: NIODeadline) async { - await withCheckedContinuation { (continuation: CheckedContinuation) in + await withCheckedContinuation { continuation in self.queue.async { - let newTime = max(deadline, self.now) - - var tasks = CircularBuffer() - while let nextTask = self.scheduledTasks.peek() { - guard nextTask.readyTime <= newTime else { - break - } - - // Now we want to grab all tasks that are ready to execute at the same - // time as the first. - while let candidateTask = self.scheduledTasks.peek(), candidateTask.readyTime == nextTask.readyTime - { - tasks.append(candidateTask) - self.scheduledTasks.pop() - } - - // Set the time correctly before we call into user code, then - // call in for all tasks. - self._now.store(nextTask.readyTime.uptimeNanoseconds, ordering: .relaxed) - - for task in tasks { - task.task() - } - - tasks.removeAll(keepingCapacity: true) - } - - // Finally ensure we got the time right. - self._now.store(newTime.uptimeNanoseconds, ordering: .relaxed) - + self._advanceTime(to: deadline) continuation.resume() } } } + internal func _advanceTime(to deadline: NIODeadline) { + dispatchPrecondition(condition: .onQueue(self.queue)) + + let newTime = max(deadline, self.now) + + var tasks = CircularBuffer() + while let nextTask = self.scheduledTasks.peek() { + guard nextTask.readyTime <= newTime else { + break + } + + // Now we want to grab all tasks that are ready to execute at the same + // time as the first. + while let candidateTask = self.scheduledTasks.peek(), candidateTask.readyTime == nextTask.readyTime { + tasks.append(candidateTask) + self.scheduledTasks.pop() + } + + // Set the time correctly before we call into user code, then + // call in for all tasks. + self._now.store(nextTask.readyTime.uptimeNanoseconds, ordering: .relaxed) + + for task in tasks { + task.task() + } + + tasks.removeAll(keepingCapacity: true) + } + + // Finally ensure we got the time right. + self._now.store(newTime.uptimeNanoseconds, ordering: .relaxed) + } + + internal func _run() { + dispatchPrecondition(condition: .onQueue(self.queue)) + self._advanceTime(to: self.now) + } + /// Executes the given function in the context of this event loop. This is useful when it's necessary to be confident that an operation /// is "blocking" the event loop. As long as you are executing, nothing else can execute in this loop. /// @@ -293,6 +294,13 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { } } + internal func _cancelRemainingScheduledTasks() { + dispatchPrecondition(condition: .onQueue(self.queue)) + while let task = self.scheduledTasks.pop() { + task.fail(EventLoopError.cancelled) + } + } + internal func drainScheduledTasksByRunningAllCurrentlyScheduledTasks() { var currentlyScheduledTasks = self.scheduledTasks while let nextTask = currentlyScheduledTasks.pop() { @@ -309,7 +317,8 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { private func _shutdownGracefully() { dispatchPrecondition(condition: .onQueue(self.queue)) - self.drainScheduledTasksByRunningAllCurrentlyScheduledTasks() + self._run() + self._cancelRemainingScheduledTasks() } /// - see: `EventLoop.shutdownGracefully` @@ -324,9 +333,11 @@ public final class NIOAsyncTestingEventLoop: EventLoop, @unchecked Sendable { /// The concurrency-aware equivalent of `shutdownGracefully(queue:_:)`. public func shutdownGracefully() async { - await withCheckedContinuation { (continuation: CheckedContinuation) in + await withCheckedContinuation { continuation in + self.state.store(.closing, ordering: .releasing) self.queue.async { self._shutdownGracefully() + self.state.store(.closed, ordering: .releasing) continuation.resume() } } diff --git a/Sources/NIOEmbedded/Embedded.swift b/Sources/NIOEmbedded/Embedded.swift index 8f808e3f0..d95b25821 100644 --- a/Sources/NIOEmbedded/Embedded.swift +++ b/Sources/NIOEmbedded/Embedded.swift @@ -80,6 +80,9 @@ public final class EmbeddedEventLoop: EventLoop { /// The current "time" for this event loop. This is an amount in nanoseconds. internal var _now: NIODeadline = .uptimeNanoseconds(0) + private enum State { case open, closing, closed } + private var state: State = .open + private var scheduledTaskCounter: UInt64 = 0 private var scheduledTasks = PriorityQueue() @@ -110,6 +113,16 @@ public final class EmbeddedEventLoop: EventLoop { @discardableResult public func scheduleTask(deadline: NIODeadline, _ task: @escaping () throws -> T) -> Scheduled { let promise: EventLoopPromise = makePromise() + + switch self.state { + case .open: + break + case .closing, .closed: + // If the event loop is shut down, or shutting down, immediately cancel the task. + promise.fail(EventLoopError.cancelled) + return Scheduled(promise: promise, cancellationTask: {}) + } + self.scheduledTaskCounter += 1 let task = EmbeddedScheduledTask( id: self.scheduledTaskCounter, @@ -197,28 +210,18 @@ public final class EmbeddedEventLoop: EventLoop { self._now = newTime } - internal func drainScheduledTasksByRunningAllCurrentlyScheduledTasks() { - var currentlyScheduledTasks = self.scheduledTasks - while let nextTask = currentlyScheduledTasks.pop() { - self._now = nextTask.readyTime - nextTask.task() - } - // Just fail all the remaining scheduled tasks. Despite having run all the tasks that were - // scheduled when we entered the method this may still contain tasks as running the tasks - // may have enqueued more tasks. + internal func cancelRemainingScheduledTasks() { while let task = self.scheduledTasks.pop() { - task.fail(EventLoopError.shutdown) + task.fail(EventLoopError.cancelled) } } - /// - see: `EventLoop.close` - func close() throws { - // Nothing to do here - } - /// - see: `EventLoop.shutdownGracefully` public func shutdownGracefully(queue: DispatchQueue, _ callback: @escaping (Error?) -> Void) { + self.state = .closing run() + cancelRemainingScheduledTasks() + self.state = .closed queue.sync { callback(nil) } @@ -640,8 +643,8 @@ public final class EmbeddedChannel: Channel { throw error } } - self.embeddedEventLoop.drainScheduledTasksByRunningAllCurrentlyScheduledTasks() self.embeddedEventLoop.run() + self.embeddedEventLoop.cancelRemainingScheduledTasks() try throwIfErrorCaught() let c = self.channelcore if c.outboundBuffer.isEmpty && c.inboundBuffer.isEmpty && c.pendingOutboundBuffer.isEmpty { diff --git a/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift b/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift index 18dde6fbf..28077adf1 100644 --- a/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift +++ b/Tests/NIOEmbeddedTests/AsyncTestingEventLoopTests.swift @@ -450,39 +450,97 @@ final class NIOAsyncTestingEventLoopTests: XCTestCase { } } - func testDrainScheduledTasks() async throws { + func testShutdownCancelsFutureScheduledTasks() async { let eventLoop = NIOAsyncTestingEventLoop() let tasksRun = ManagedAtomic(0) - let startTime = eventLoop.now - eventLoop.scheduleTask(in: .nanoseconds(3_141_592)) { - XCTAssertEqual(eventLoop.now, startTime + .nanoseconds(3_141_592)) - tasksRun.wrappingIncrement(ordering: .relaxed) + let a = eventLoop.scheduleTask(in: .seconds(1)) { tasksRun.wrappingIncrement(ordering: .relaxed) } + let b = eventLoop.scheduleTask(in: .seconds(2)) { tasksRun.wrappingIncrement(ordering: .relaxed) } + + XCTAssertEqual(tasksRun.load(ordering: .relaxed), 0) + + await eventLoop.advanceTime(by: .seconds(1)) + XCTAssertEqual(tasksRun.load(ordering: .relaxed), 1) + + XCTAssertNoThrow(try eventLoop.syncShutdownGracefully()) + XCTAssertEqual(tasksRun.load(ordering: .relaxed), 1) + + await eventLoop.advanceTime(by: .seconds(1)) + XCTAssertEqual(tasksRun.load(ordering: .relaxed), 1) + + await eventLoop.advanceTime(to: .distantFuture) + XCTAssertEqual(tasksRun.load(ordering: .relaxed), 1) + + XCTAssertNoThrow(try a.futureResult.wait()) + await XCTAssertThrowsError(try await b.futureResult.get()) { error in + XCTAssertEqual(error as? EventLoopError, .cancelled) + XCTAssertEqual(tasksRun.load(ordering: .relaxed), 1) } - - eventLoop.scheduleTask(in: .seconds(3_141_592)) { - XCTAssertEqual(eventLoop.now, startTime + .seconds(3_141_592)) - tasksRun.wrappingIncrement(ordering: .relaxed) - } - - await eventLoop.shutdownGracefully() - XCTAssertEqual(tasksRun.load(ordering: .relaxed), 2) } - func testDrainScheduledTasksDoesNotRunNewlyScheduledTasks() async throws { + func testTasksScheduledDuringShutdownAreAutomaticallyCancelled() async throws { let eventLoop = NIOAsyncTestingEventLoop() let tasksRun = ManagedAtomic(0) + var childTasks: [Scheduled] = [] - func scheduleNowAndIncrement() { - eventLoop.scheduleTask(in: .nanoseconds(0)) { + func scheduleRecursiveTask( + at taskStartTime: NIODeadline, + andChildTaskAfter childTaskStartDelay: TimeAmount + ) -> Scheduled { + eventLoop.scheduleTask(deadline: taskStartTime) { tasksRun.wrappingIncrement(ordering: .relaxed) - scheduleNowAndIncrement() + childTasks.append( + scheduleRecursiveTask( + at: eventLoop.now + childTaskStartDelay, + andChildTaskAfter: childTaskStartDelay + ) + ) } } - scheduleNowAndIncrement() - await eventLoop.shutdownGracefully() - XCTAssertEqual(tasksRun.load(ordering: .relaxed), 1) + _ = scheduleRecursiveTask(at: .uptimeNanoseconds(1), andChildTaskAfter: .zero) + + try await withThrowingTaskGroup(of: Void.self) { group in + group.addTask { + try await Task.sleep(for: .milliseconds(1)) + await eventLoop.shutdownGracefully() + } + group.addTask { + await eventLoop.advanceTime(to: .uptimeNanoseconds(1)) + } + try await group.waitForAll() + } + + XCTAssertGreaterThan(tasksRun.load(ordering: .relaxed), 1) + XCTAssertEqual(childTasks.count, tasksRun.load(ordering: .relaxed)) + } + + func testShutdownCancelsRemainingScheduledTasks() async { + let eventLoop = NIOAsyncTestingEventLoop() + var tasksRun = 0 + + let a = eventLoop.scheduleTask(in: .seconds(1)) { tasksRun += 1 } + let b = eventLoop.scheduleTask(in: .seconds(2)) { tasksRun += 1 } + + XCTAssertEqual(tasksRun, 0) + + await eventLoop.advanceTime(by: .seconds(1)) + XCTAssertEqual(tasksRun, 1) + + XCTAssertNoThrow(try eventLoop.syncShutdownGracefully()) + XCTAssertEqual(tasksRun, 1) + + await eventLoop.advanceTime(by: .seconds(1)) + XCTAssertEqual(tasksRun, 1) + + await eventLoop.advanceTime(to: .distantFuture) + XCTAssertEqual(tasksRun, 1) + + XCTAssertNoThrow(try a.futureResult.wait()) + await XCTAssertThrowsError(try await b.futureResult.get()) { error in + XCTAssertEqual(error as? EventLoopError, .cancelled) + XCTAssertEqual(tasksRun, 1) + } } func testAdvanceTimeToDeadline() async throws { diff --git a/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift b/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift index 0d82d20f3..b4adc09b6 100644 --- a/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift +++ b/Tests/NIOEmbeddedTests/EmbeddedChannelTest.swift @@ -478,19 +478,37 @@ class EmbeddedChannelTest: XCTestCase { func testFinishWithRecursivelyScheduledTasks() throws { let channel = EmbeddedChannel() + var tasks: [Scheduled] = [] var invocations = 0 func recursivelyScheduleAndIncrement() { - channel.pipeline.eventLoop.scheduleTask(deadline: .distantFuture) { + let task = channel.pipeline.eventLoop.scheduleTask(deadline: .distantFuture) { invocations += 1 recursivelyScheduleAndIncrement() } + tasks.append(task) } recursivelyScheduleAndIncrement() try XCTAssertNoThrow(channel.finish()) - XCTAssertEqual(invocations, 1) + + // None of the tasks should have been executed, they were scheduled for distant future. + XCTAssertEqual(invocations, 0) + + // Because the root task didn't run, it should be the onnly one scheduled. + XCTAssertEqual(tasks.count, 1) + + // Check the task was failed with cancelled error. + let taskChecked = expectation(description: "task future fulfilled") + tasks.first?.futureResult.whenComplete { result in + switch result { + case .success: XCTFail("Expected task to be cancelled, not run.") + case .failure(let error): XCTAssertEqual(error as? EventLoopError, .cancelled) + } + taskChecked.fulfill() + } + wait(for: [taskChecked], timeout: 0) } func testGetChannelOptionAutoReadIsSupported() { diff --git a/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest.swift b/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest.swift index f428c5534..a23665ec2 100644 --- a/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest.swift +++ b/Tests/NIOEmbeddedTests/EmbeddedEventLoopTest.swift @@ -354,42 +354,67 @@ public final class EmbeddedEventLoopTest: XCTestCase { } } - func testDrainScheduledTasks() { + func testShutdownCancelsFutureScheduledTasks() { let eventLoop = EmbeddedEventLoop() - let timeAtStart = eventLoop._now var tasksRun = 0 - eventLoop.scheduleTask(in: .nanoseconds(3_141_592)) { - XCTAssertEqual(eventLoop._now, timeAtStart + .nanoseconds(3_141_592)) - tasksRun += 1 - } + let a = eventLoop.scheduleTask(in: .seconds(1)) { tasksRun += 1 } + let b = eventLoop.scheduleTask(in: .seconds(2)) { tasksRun += 1 } - eventLoop.scheduleTask(in: .seconds(3_141_592)) { - XCTAssertEqual(eventLoop._now, timeAtStart + .seconds(3_141_592)) - tasksRun += 1 - } + XCTAssertEqual(tasksRun, 0) - eventLoop.drainScheduledTasksByRunningAllCurrentlyScheduledTasks() - XCTAssertEqual(tasksRun, 2) + eventLoop.advanceTime(by: .seconds(1)) + XCTAssertEqual(tasksRun, 1) + + XCTAssertNoThrow(try eventLoop.syncShutdownGracefully()) + XCTAssertEqual(tasksRun, 1) + + eventLoop.advanceTime(by: .seconds(1)) + XCTAssertEqual(tasksRun, 1) + + eventLoop.advanceTime(to: .distantFuture) + XCTAssertEqual(tasksRun, 1) + + XCTAssertNoThrow(try a.futureResult.wait()) + XCTAssertThrowsError(try b.futureResult.wait()) { error in + XCTAssertEqual(error as? EventLoopError, .cancelled) + XCTAssertEqual(tasksRun, 1) + } } - func testDrainScheduledTasksDoesNotRunNewlyScheduledTasks() { + func testTasksScheduledDuringShutdownAreAutomaticallyCancelled() throws { let eventLoop = EmbeddedEventLoop() var tasksRun = 0 - var lastScheduled: Scheduled? + var childTasks: [Scheduled] = [] - func scheduleNowAndIncrement() { - lastScheduled = eventLoop.scheduleTask(in: .nanoseconds(0)) { + func scheduleRecursiveTask( + at taskStartTime: NIODeadline, + andChildTaskAfter childTaskStartDelay: TimeAmount + ) -> Scheduled { + eventLoop.scheduleTask(deadline: taskStartTime) { tasksRun += 1 - scheduleNowAndIncrement() + try eventLoop.syncShutdownGracefully() + childTasks.append( + scheduleRecursiveTask( + at: eventLoop._now + childTaskStartDelay, + andChildTaskAfter: childTaskStartDelay + ) + ) } } - scheduleNowAndIncrement() - eventLoop.drainScheduledTasksByRunningAllCurrentlyScheduledTasks() + let rootTask = scheduleRecursiveTask(at: .uptimeNanoseconds(1), andChildTaskAfter: .zero) + + eventLoop.advanceTime(to: .uptimeNanoseconds(1)) + XCTAssertEqual(tasksRun, 1) - XCTAssertThrowsError(try lastScheduled!.futureResult.wait()) { error in - XCTAssertEqual(error as! EventLoopError, EventLoopError.shutdown) + XCTAssertNoThrow(try rootTask.futureResult.wait()) + + for childTask in childTasks { + XCTAssertThrowsError(try childTask.futureResult.wait()) { error in + XCTAssertEqual(error as? EventLoopError, .cancelled) + XCTAssertEqual(tasksRun, 1) + } } } diff --git a/Tests/NIOPosixTests/XCTest+AsyncAwait.swift b/Tests/NIOPosixTests/XCTest+AsyncAwait.swift index cdc94c2ed..3d58bffa3 100644 --- a/Tests/NIOPosixTests/XCTest+AsyncAwait.swift +++ b/Tests/NIOPosixTests/XCTest+AsyncAwait.swift @@ -64,7 +64,7 @@ internal func XCTAssertNoThrow( do { _ = try await expression() } catch { - XCTFail("Expression did throw error", file: file, line: line) + XCTFail("Expression did throw error: \(error)", file: file, line: line) } } diff --git a/docker/docker-compose.2204.510.yaml b/docker/docker-compose.2204.510.yaml index 038b7fe4b..f9f8bf5a3 100644 --- a/docker/docker-compose.2204.510.yaml +++ b/docker/docker-compose.2204.510.yaml @@ -22,10 +22,10 @@ services: image: swift-nio:22.04-5.10 environment: - SWIFT_VERSION=5.10 - - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=21 + - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=19 - MAX_ALLOCS_ALLOWED_1000000_asyncwriter=1000050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers=44050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=37050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=43050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=36050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=8050 @@ -34,7 +34,7 @@ services: - MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_getHandlers=8050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=34 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=26400 - MAX_ALLOCS_ALLOWED_1000_rst_connections=145050 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=3050 @@ -42,7 +42,7 @@ services: - MAX_ALLOCS_ALLOWED_1000_udp_reqs=6050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - MAX_ALLOCS_ALLOWED_1000_udpconnections=75050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=389000 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=389050 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -64,7 +64,7 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=6050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=319 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110200 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110050 - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=40100 - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=50050 - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=89 diff --git a/docker/docker-compose.2204.58.yaml b/docker/docker-compose.2204.58.yaml index ee41e86c7..9ced32b04 100644 --- a/docker/docker-compose.2204.58.yaml +++ b/docker/docker-compose.2204.58.yaml @@ -22,10 +22,10 @@ services: image: swift-nio:22.04-5.8 environment: - SWIFT_VERSION=5.8 - - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=22 + - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=20 - MAX_ALLOCS_ALLOWED_1000000_asyncwriter=1000050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers=44050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=37050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=43050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=36050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=8050 @@ -34,7 +34,7 @@ services: - MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_getHandlers=8050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=34 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=26400 - MAX_ALLOCS_ALLOWED_1000_rst_connections=147050 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 @@ -42,7 +42,7 @@ services: - MAX_ALLOCS_ALLOWED_1000_udp_reqs=6050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - MAX_ALLOCS_ALLOWED_1000_udpconnections=75050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=398000 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=398050 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -64,7 +64,7 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=6050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=334 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110200 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110050 - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=40100 - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=50050 - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=89 diff --git a/docker/docker-compose.2204.59.yaml b/docker/docker-compose.2204.59.yaml index 2b53a8591..a1006ab0e 100644 --- a/docker/docker-compose.2204.59.yaml +++ b/docker/docker-compose.2204.59.yaml @@ -22,10 +22,10 @@ services: image: swift-nio:22.04-5.9 environment: - SWIFT_VERSION=5.9 - - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=21 + - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=19 - MAX_ALLOCS_ALLOWED_1000000_asyncwriter=1000050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers=44050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=37050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=43050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=36050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=8050 @@ -34,7 +34,7 @@ services: - MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_getHandlers=8050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=34 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=26400 - MAX_ALLOCS_ALLOWED_1000_rst_connections=147050 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050 @@ -64,7 +64,7 @@ services: - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=6050 - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=334 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110200 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110050 - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=40100 - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=50050 - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=89 diff --git a/docker/docker-compose.2204.main.yaml b/docker/docker-compose.2204.main.yaml index 3cf6042be..0ac14b05e 100644 --- a/docker/docker-compose.2204.main.yaml +++ b/docker/docker-compose.2204.main.yaml @@ -21,10 +21,10 @@ services: image: swift-nio:22.04-main environment: - SWIFT_VERSION=nightly-main - - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=21 + - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=19 - MAX_ALLOCS_ALLOWED_1000000_asyncwriter=1000050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers=45050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=38050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=43050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=36050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=8050 @@ -33,15 +33,15 @@ services: - MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_getHandlers=8050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=34 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=26400 - - MAX_ALLOCS_ALLOWED_1000_rst_connections=147000 + - MAX_ALLOCS_ALLOWED_1000_rst_connections=145050 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=3050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=155050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=152050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=6050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=76050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=393000 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=75050 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=389050 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -62,13 +62,13 @@ services: - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace_from_short_string=700050 - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=6050 - - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=343 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110200 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=50100 + - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=319 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=40100 - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=50050 - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=89 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=6200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=165050 + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=162050 - WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors - IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error # - SANITIZER_ARG=--sanitize=thread # TSan broken still diff --git a/docker/docker-compose.2204.nightly-6.0.yaml b/docker/docker-compose.2204.nightly-6.0.yaml index 83bcb4b3d..93f4fcc22 100644 --- a/docker/docker-compose.2204.nightly-6.0.yaml +++ b/docker/docker-compose.2204.nightly-6.0.yaml @@ -21,10 +21,10 @@ services: image: swift-nio:22.04-next environment: - SWIFT_VERSION=nightly-6.0 - - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=21 + - MAX_ALLOCS_ALLOWED_10000000_asyncsequenceproducer=19 - MAX_ALLOCS_ALLOWED_1000000_asyncwriter=1000050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers=45050 - - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=38050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers=43050 + - MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=36050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=8050 - MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=8050 @@ -33,15 +33,15 @@ services: - MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050 - MAX_ALLOCS_ALLOWED_1000_getHandlers=8050 - - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=36 + - MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=34 - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=26400 - - MAX_ALLOCS_ALLOWED_1000_rst_connections=147000 + - MAX_ALLOCS_ALLOWED_1000_rst_connections=145050 - MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=3050 - - MAX_ALLOCS_ALLOWED_1000_tcpconnections=155050 + - MAX_ALLOCS_ALLOWED_1000_tcpconnections=152050 - MAX_ALLOCS_ALLOWED_1000_udp_reqs=6050 - MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050 - - MAX_ALLOCS_ALLOWED_1000_udpconnections=76050 - - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=393000 + - MAX_ALLOCS_ALLOWED_1000_udpconnections=75050 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=389050 - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050 - MAX_ALLOCS_ALLOWED_creating_10000_headers=0 - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050 @@ -62,14 +62,13 @@ services: - MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace_from_short_string=700050 - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=0 - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=6050 - - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=343 - - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110200 - - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=50100 + - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=319 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=110050 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=40100 - MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=50050 - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=89 - MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=6200 - - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=165050 - - WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors + - MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=162050 - IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error # - SANITIZER_ARG=--sanitize=thread # TSan broken still