Files
swift-nio/docker/docker-compose.2004.55.yaml
T
Franz BuschandCory Benfield 1abe64c5e6 Add benchmarks for NIOAsyncWriter and NIOAsyncSequenceProducer (#2301)
# Motivation
We landed the async bridge types a while back but never added allocation and performance tests. Since we expect these types to be used performance critical paths we really should cover those with tests.

# Modification
Extends the allocation counter scaffolding to support async tests. Furthermore, add allocations tests for both the writer and producer. Lastly, I a also added a performance test for the producer.

# Result
We now have baseline tests for the `NIOAsyncWriter` and `NIOAsyncSequenceProducer`

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-10-26 03:51:20 -07:00

79 lines
3.2 KiB
YAML

version: "3"
services:
runtime-setup:
image: swift-nio:20.04-5.5
build:
args:
ubuntu_version: "focal"
swift_version: "5.5"
unit-tests:
image: swift-nio:20.04-5.5
integration-tests:
image: swift-nio:20.04-5.5
test:
image: swift-nio:20.04-5.5
environment:
- MAX_ALLOCS_ALLOWED_1000_addHandlers=47050
- MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050
- MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlercontext=9050
- MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlername=9050
- MAX_ALLOCS_ALLOWED_1000_addRemoveHandlers_handlertype=9050
- MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet=21050
- MAX_ALLOCS_ALLOWED_1000_autoReadGetAndSet_sync=0
- MAX_ALLOCS_ALLOWED_1000_copying_bytebufferview_to_array=1050
- MAX_ALLOCS_ALLOWED_1000_copying_circularbuffer_to_array=1050
- MAX_ALLOCS_ALLOWED_1000_getHandlers=9050
- MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=37
- MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30400
- MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4050
- MAX_ALLOCS_ALLOWED_1000_tcpconnections=158050
- MAX_ALLOCS_ALLOWED_1000_udp_reqs=12050
- MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2050
- MAX_ALLOCS_ALLOWED_1000_udpconnections=84050
- MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=415000
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2050
- MAX_ALLOCS_ALLOWED_creating_10000_headers=0
- MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2050
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer=3
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_space=3
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer=3050
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_space=3050
- MAX_ALLOCS_ALLOWED_execute_hop_10000_tasks=0
- MAX_ALLOCS_ALLOWED_future_erase_result=4050
- MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=56050
- MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form=700050
- MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace=700050
- MAX_ALLOCS_ALLOWED_get_100000_headers_canonical_form_trimming_whitespace_from_long_string=700050
- 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=2050
- MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4400
- MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=170050
- MAX_ALLOCS_ALLOWED_schedule_10000_tasks=60100
- MAX_ALLOCS_ALLOWED_schedule_and_run_10000_tasks=60050
- MAX_ALLOCS_ALLOWED_scheduling_10000_executions=98
- MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=12200
- MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=168050
- MAX_ALLOCS_ALLOWED_test_10000000_asyncsequenceproducer=12
- MAX_ALLOCS_ALLOWED_test_10000000_asyncwriter=1000007
- FORCE_TEST_DISCOVERY=--enable-test-discovery
# - WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors
# - SANITIZER_ARG=--sanitize=thread # TSan broken still
performance-test:
image: swift-nio:20.04-5.5
shell:
image: swift-nio:20.04-5.5
echo:
image: swift-nio:20.04-5.5
http:
image: swift-nio:20.04-5.5