Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add baseline performance and allocation tests for scheduleTask and execute #2009

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

FranzBusch
Copy link
Member

Motivation:

In issue #1316, we see a large number of allocations to happen when scheduling tasks. This can definitely be optimized. This PR adds a number of baseline allocation and performance tests for both scheduleTask and execute. In the next PRs, I am going to try a few optimizations to reduce the number of allocations.

Modifications:

Added baseline performance and allocation tests for scheduleTask and execute

@swift-server-bot
Copy link

Can one of the admins verify this patch?

11 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@Lukasa Lukasa added the semver/none No version bump required. label Dec 13, 2021
@Lukasa
Copy link
Contributor

Lukasa commented Dec 13, 2021

@swift-nio-bot add to allowlist

@FranzBusch
Copy link
Member Author

@swift-nio-bot test perf please

@swift-server-bot
Copy link

performance report

build id: 86

timestamp: Mon Dec 13 10:18:41 UTC 2021

results

nameminmaxmeanstd
write_http_headers 0.004181683 0.00419848 0.0041882588 5.679243255536417e-06
http_headers_canonical_form 0.088280403 0.088960367 0.0885495857 0.00027502390809287525
http_headers_canonical_form_trimming_whitespace 0.166300755 0.16721034 0.1668423685 0.00025748657065057196
http_headers_canonical_form_trimming_whitespace_from_short_string 0.152091764 0.154257712 0.1528387158 0.0005962505232489278
http_headers_canonical_form_trimming_whitespace_from_long_string 0.23370555 0.234566305 0.23392992559999998 0.00027872681249415944
bytebuffer_write_12MB_short_string_literals 0.530690609 0.536029141 0.5320674451 0.0014701526501952398
bytebuffer_write_12MB_short_calculated_strings 0.529470428 0.531035487 0.5301427090999999 0.0004692002289827216
bytebuffer_write_12MB_medium_string_literals 0.177593152 0.179410225 0.17824290869999998 0.0005699029513992429
bytebuffer_write_12MB_medium_calculated_strings 0.227880277 0.231645289 0.22963474069999998 0.0014596889419563248
bytebuffer_write_12MB_large_calculated_strings 0.145611768 0.147727635 0.1464520367 0.0006986068515236501
bytebuffer_lots_of_rw 0.4488725 0.459179913 0.4515290218 0.0034824985122768096
bytebuffer_write_http_response_ascii_only_as_string 0.042046273 0.042588278 0.0421874227 0.00020872608847485107
bytebuffer_write_http_response_ascii_only_as_staticstring 0.032673045 0.033177587 0.032836602 0.00017518390748835611
bytebuffer_write_http_response_some_nonascii_as_string 0.041080209 0.041596573 0.0412131052 0.00020037218349018004
bytebuffer_write_http_response_some_nonascii_as_staticstring 0.031972992 0.032647224 0.0321295932 0.00025064920465809085
no-net_http1_10k_reqs_1_conn 0.107251599 0.108321689 0.10792686430000001 0.00032855149145066446
http1_10k_reqs_1_conn 0.606198334 0.611365593 0.6087982366 0.0016889357400719774
http1_10k_reqs_100_conns 0.595750262 0.599253981 0.5975085753 0.0011763844526648587
future_whenallsucceed_100k_immediately_succeeded_off_loop 0.072592465 0.07541179 0.0735046843 0.0008820330198477778
future_whenallsucceed_100k_immediately_succeeded_on_loop 0.073282929 0.081345271 0.0746511792 0.002374759535852972
future_whenallsucceed_100k_deferred_off_loop 0.276251484 0.28077832 0.2781130441 0.0012853612973831752
future_whenallsucceed_100k_deferred_on_loop 0.127393085 0.129395132 0.1282683175 0.0006808451114260311
future_whenallcomplete_100k_immediately_succeeded_off_loop 0.031215859 0.031831964 0.0313432712 0.00017641861667623193
future_whenallcomplete_100k_immediately_succeeded_on_loop 0.031055193 0.032100482 0.0312840224 0.00033296529072936236
future_whenallcomplete_100k_deferred_off_loop 0.202281603 0.207725647 0.20440124399999998 0.0018717677223810546
future_whenallcomplete_100k_deferred_on_loop 0.063422148 0.068546908 0.0643776135 0.0015051761114331273
future_reduce_10k_futures 0.037939592 0.03930436 0.038461104 0.00040026585766324014
future_reduce_into_10k_futures 0.03668414 0.037614282 0.0372455098 0.00025922182919088237
channel_pipeline_1m_events 0.097144949 0.097259013 0.09720304960000001 4.272276364396341e-05
websocket_encode_50b_space_at_front_1m_frames_cow 0.498080928 0.502934346 0.4988613646 0.001446039957120451
websocket_encode_50b_space_at_front_1m_frames_cow_masking 0.065352785 0.065828104 0.0655052926 0.00020812040897583012
websocket_encode_1kb_space_at_front_100k_frames_cow 0.052190514 0.052616319 0.05229334249999999 0.000148241847074487
websocket_encode_50b_no_space_at_front_1m_frames_cow 0.49791507 0.498461567 0.49823382479999995 0.00021837047353461306
websocket_encode_1kb_no_space_at_front_100k_frames_cow 0.053094888 0.053572219 0.053256041600000005 0.00021181124150956192
websocket_encode_50b_space_at_front_10k_frames 0.006497168 0.006527302 0.0065107715 8.054518597242853e-06
websocket_encode_50b_space_at_front_10k_frames_masking 0.080461614 0.082979164 0.08171931369999999 0.000788231107107136
websocket_encode_1kb_space_at_front_1k_frames 0.000767638 0.001195098 0.0008189416 0.00013235987850234509
websocket_encode_50b_no_space_at_front_10k_frames 0.006473275 0.006628408 0.006499185100000001 4.618992939411493e-05
websocket_encode_1kb_no_space_at_front_1k_frames 0.000691692 0.000714168 0.0006978291 6.604003759504958e-06
websocket_decode_125b_100k_frames 0.118015696 0.119644322 0.1188396059 0.0005329150017194613
websocket_decode_125b_with_a_masking_key_100k_frames 0.121071746 0.123078065 0.12226093860000001 0.0005593495546958901
websocket_decode_64kb_100k_frames 0.121445759 0.1226395 0.1220470142 0.0003868785623846893
websocket_decode_64kb_with_a_masking_key_100k_frames 0.124691601 0.125603838 0.1251748452 0.0003116981925648265
websocket_decode_64kb_+1_100k_frames 0.121346341 0.122516629 0.1220846637 0.0003417270245841309
websocket_decode_64kb_+1_with_a_masking_key_100k_frames 0.124321178 0.125724746 0.1251648886 0.0004742582542364182
circular_buffer_into_byte_buffer_1kb 0.041240453 0.041685421 0.0413399111 0.0001781981546546488
circular_buffer_into_byte_buffer_1mb 0.082248323 0.082740883 0.08246785920000001 0.00022237980389854453
byte_buffer_view_iterator_1mb 0.020483764 0.020954167 0.020544609 0.00014435804421183648
byte_to_message_decoder_decode_many_small 0.175526164 0.176096016 0.1759440154 0.00015889827468414797
generate_10k_random_request_keys 0.089435503 0.089919354 0.089656488 0.0001493319151428207
bytebuffer_rw_10_uint32s 0.302212625 0.305510024 0.3038241752 0.0008956250133399414
bytebuffer_multi_rw_10_uint32s 0.056694414 0.058200918 0.057286872 0.0004635438440178975
lock_1_thread_10M_ops 0.159248749 0.159398986 0.1593490236 4.8406479254560716e-05
lock_2_threads_10M_ops 0.905534662 0.924928441 0.9151533676 0.006131675122356128
lock_4_threads_10M_ops 0.887765223 0.941129604 0.9179571521 0.015512557338028683
lock_8_threads_10M_ops 0.981888731 1.003041138 0.9877665576 0.006135459850756093
schedule_10000_tasks 0.007262385 0.010614827 0.008967739200000002 0.0009997790607696841
schedule_and_run_10000_tasks 0.028930757 0.031892925 0.0310913962 0.0009882569532542074
execute_10000 0.016950482 0.01722626 0.0170166405 9.874340280550927e-05

comparison

name current previous winner diff
write_http_headers 0.004181683 0.004161533 previous 0%
http_headers_canonical_form 0.088280403 0.088032625 previous 0%
http_headers_canonical_form_trimming_whitespace 0.166300755 0.166605663 current 0%
http_headers_canonical_form_trimming_whitespace_from_short_string 0.152091764 0.152258807 current 0%
http_headers_canonical_form_trimming_whitespace_from_long_string 0.23370555 0.236200021 current -1%
bytebuffer_write_12MB_short_string_literals 0.530690609 0.526864105 previous 0%
bytebuffer_write_12MB_short_calculated_strings 0.529470428 0.527654621 previous 0%
bytebuffer_write_12MB_medium_string_literals 0.177593152 0.178030343 current 0%
bytebuffer_write_12MB_medium_calculated_strings 0.227880277 0.228324955 current 0%
bytebuffer_write_12MB_large_calculated_strings 0.145611768 0.1485951 current -2%
bytebuffer_lots_of_rw 0.4488725 0.448509118 previous 0%
bytebuffer_write_http_response_ascii_only_as_string 0.042046273 0.04086237 previous 2%
bytebuffer_write_http_response_ascii_only_as_staticstring 0.032673045 0.032234329 previous 1%
bytebuffer_write_http_response_some_nonascii_as_string 0.041080209 0.039979649 previous 2%
bytebuffer_write_http_response_some_nonascii_as_staticstring 0.031972992 0.031161206 previous 2%
no-net_http1_10k_reqs_1_conn 0.107251599 0.108638033 current -1%
http1_10k_reqs_1_conn 0.606198334 0.606939724 current 0%
http1_10k_reqs_100_conns 0.595750262 0.599890175 current 0%
future_whenallsucceed_100k_immediately_succeeded_off_loop 0.072592465 0.07269098 current 0%
future_whenallsucceed_100k_immediately_succeeded_on_loop 0.073282929 0.072607496 previous 0%
future_whenallsucceed_100k_deferred_off_loop 0.276251484 0.281460284 current -1%
future_whenallsucceed_100k_deferred_on_loop 0.127393085 0.127201293 previous 0%
future_whenallcomplete_100k_immediately_succeeded_off_loop 0.031215859 0.031101833 previous 0%
future_whenallcomplete_100k_immediately_succeeded_on_loop 0.031055193 0.030881767 previous 0%
future_whenallcomplete_100k_deferred_off_loop 0.202281603 0.204709938 current -1%
future_whenallcomplete_100k_deferred_on_loop 0.063422148 0.064252127 current -1%
future_reduce_10k_futures 0.037939592 0.036599588 previous 3%
future_reduce_into_10k_futures 0.03668414 0.036464604 previous 0%
channel_pipeline_1m_events 0.097144949 0.097139711 previous 0%
websocket_encode_50b_space_at_front_1m_frames_cow 0.498080928 0.49723517 previous 0%
websocket_encode_50b_space_at_front_1m_frames_cow_masking 0.065352785 0.06543051 current 0%
websocket_encode_1kb_space_at_front_100k_frames_cow 0.052190514 0.052535648 current 0%
websocket_encode_50b_no_space_at_front_1m_frames_cow 0.49791507 0.496077749 previous 0%
websocket_encode_1kb_no_space_at_front_100k_frames_cow 0.053094888 0.052500886 previous 1%
websocket_encode_50b_space_at_front_10k_frames 0.006497168 0.006527621 current 0%
websocket_encode_50b_space_at_front_10k_frames_masking 0.080461614 0.080652866 current 0%
websocket_encode_1kb_space_at_front_1k_frames 0.000767638 0.000753354 previous 1%
websocket_encode_50b_no_space_at_front_10k_frames 0.006473275 0.006491826 current 0%
websocket_encode_1kb_no_space_at_front_1k_frames 0.000691692 0.000698582 current 0%
websocket_decode_125b_100k_frames 0.118015696 0.116003238 previous 1%
websocket_decode_125b_with_a_masking_key_100k_frames 0.121071746 0.118769877 previous 1%
websocket_decode_64kb_100k_frames 0.121445759 0.119039292 previous 2%
websocket_decode_64kb_with_a_masking_key_100k_frames 0.124691601 0.121086765 previous 2%
websocket_decode_64kb_+1_100k_frames 0.121346341 0.118274354 previous 2%
websocket_decode_64kb_+1_with_a_masking_key_100k_frames 0.124321178 0.121695924 previous 2%
circular_buffer_into_byte_buffer_1kb 0.041240453 0.041228652 previous 0%
circular_buffer_into_byte_buffer_1mb 0.082248323 0.08225109 current 0%
byte_buffer_view_iterator_1mb 0.020483764 0.020484393 current 0%
byte_to_message_decoder_decode_many_small 0.175526164 0.174993564 previous 0%
generate_10k_random_request_keys 0.089435503 0.090469286 current -1%
bytebuffer_rw_10_uint32s 0.302212625 0.304466491 current 0%
bytebuffer_multi_rw_10_uint32s 0.056694414 0.057561737 current -1%
lock_1_thread_10M_ops 0.159248749 0.159159621 previous 0%
lock_2_threads_10M_ops 0.905534662 0.9366151 current -3%
lock_4_threads_10M_ops 0.887765223 0.86817247 previous 2%
lock_8_threads_10M_ops 0.981888731 0.916392903 previous 7%
schedule_10000_tasks 0.007262385 n/a n/a n/a%
schedule_and_run_10000_tasks 0.028930757 n/a n/a n/a%
execute_10000 0.016950482 n/a n/a n/a%

significant differences found

@FranzBusch FranzBusch force-pushed the feature/scheduling-task-tests branch 3 times, most recently from 5ff8490 to f6f7437 Compare December 13, 2021 15:06
…d executing

### Motivation:

In issue apple#1316, we see a large number of allocations to happen when scheduling tasks. This can definitely be optimized. This PR adds a number of baseline allocation and performance tests for both `scheduleTask` and `execute`. In the next PRs, I am going to try a few optimizations to reduce the number of allocations.

### Modifications:

Added baseline performance and allocation tests for `scheduleTask` and `execute`
@FranzBusch
Copy link
Member Author

@swift-nio-bot test perf please

@swift-server-bot
Copy link

performance report

build id: 87

timestamp: Mon Dec 13 15:47:57 UTC 2021

results

nameminmaxmeanstd
write_http_headers 0.004150245 0.004182262 0.0041642475 9.836764296928733e-06
http_headers_canonical_form 0.088151665 0.088798493 0.0884415488 0.000262708883633068
http_headers_canonical_form_trimming_whitespace 0.165001179 0.165547777 0.165378712 0.00018216936730965557
http_headers_canonical_form_trimming_whitespace_from_short_string 0.151172276 0.152510868 0.1516468206 0.00036273695786009794
http_headers_canonical_form_trimming_whitespace_from_long_string 0.233074251 0.233667912 0.23335285 0.0001937752041590695
bytebuffer_write_12MB_short_string_literals 0.514837219 0.520938153 0.5158306579999999 0.001826414206246408
bytebuffer_write_12MB_short_calculated_strings 0.512420607 0.514439838 0.5133927133 0.0006011900844381051
bytebuffer_write_12MB_medium_string_literals 0.175086627 0.176785562 0.1757585973 0.0004496842360274256
bytebuffer_write_12MB_medium_calculated_strings 0.228015571 0.230802688 0.2291401902 0.0009962864154794287
bytebuffer_write_12MB_large_calculated_strings 0.146718247 0.148377381 0.1472564416 0.0004928461481680124
bytebuffer_lots_of_rw 0.446916403 0.461174989 0.449755893 0.004483922624373313
bytebuffer_write_http_response_ascii_only_as_string 0.041546108 0.0421527 0.041695063500000004 0.00023205076033309347
bytebuffer_write_http_response_ascii_only_as_staticstring 0.032034232 0.032457895 0.0321557604 0.0001201774865274037
bytebuffer_write_http_response_some_nonascii_as_string 0.040761377 0.041373266 0.0409037463 0.00021168715453026972
bytebuffer_write_http_response_some_nonascii_as_staticstring 0.031636279 0.032349298 0.0318404279 0.00021094543880162696
no-net_http1_10k_reqs_1_conn 0.112445435 0.114078331 0.11325210989999998 0.0004987695964407385
http1_10k_reqs_1_conn 0.608434794 0.613992341 0.611510681 0.0019482133964456323
http1_10k_reqs_100_conns 0.597905967 0.602882325 0.6008220671 0.0013963610000428284
future_whenallsucceed_100k_immediately_succeeded_off_loop 0.073521312 0.075993332 0.0741790053 0.0007172961579377309
future_whenallsucceed_100k_immediately_succeeded_on_loop 0.073888963 0.080727408 0.0750029968 0.0020462522049390025
future_whenallsucceed_100k_deferred_off_loop 0.279554869 0.284197443 0.28168743529999996 0.0015325119391633585
future_whenallsucceed_100k_deferred_on_loop 0.126860704 0.129723743 0.12794154600000002 0.0008147029031710496
future_whenallcomplete_100k_immediately_succeeded_off_loop 0.030937702 0.031507415 0.0310840727 0.00021764124195670104
future_whenallcomplete_100k_immediately_succeeded_on_loop 0.030807059 0.031494181 0.031080669100000003 0.00024147664574375628
future_whenallcomplete_100k_deferred_off_loop 0.204846221 0.210553617 0.2073923493 0.002281868177810752
future_whenallcomplete_100k_deferred_on_loop 0.063921831 0.06832439 0.0648359071 0.0012545379556345264
future_reduce_10k_futures 0.037288194 0.038229105 0.0375980846 0.0003333950673307706
future_reduce_into_10k_futures 0.03699427 0.037927765 0.0374871709 0.0002887181349626694
channel_pipeline_1m_events 0.096576897 0.096721124 0.09664232660000001 5.43078731967631e-05
websocket_encode_50b_space_at_front_1m_frames_cow 0.497076788 0.498531123 0.4974499619 0.0004383208247314048
websocket_encode_50b_space_at_front_1m_frames_cow_masking 0.065933174 0.066547291 0.0661884312 0.00024486383856466536
websocket_encode_1kb_space_at_front_100k_frames_cow 0.05264102 0.054417608 0.05350432819999999 0.0006450046122513478
websocket_encode_50b_no_space_at_front_1m_frames_cow 0.497166776 0.497700403 0.4974060113 0.0002032717367100652
websocket_encode_1kb_no_space_at_front_100k_frames_cow 0.053062186 0.054073393 0.0536684417 0.0003544474549928375
websocket_encode_50b_space_at_front_10k_frames 0.006526258 0.006624291 0.006542315999999999 2.922775354578818e-05
websocket_encode_50b_space_at_front_10k_frames_masking 0.081560789 0.082271694 0.0818283242 0.0002708151131240667
websocket_encode_1kb_space_at_front_1k_frames 0.000769075 0.000784267 0.0007797073 4.62049355348296e-06
websocket_encode_50b_no_space_at_front_10k_frames 0.006504746 0.006529685 0.0065151078 7.443543373659948e-06
websocket_encode_1kb_no_space_at_front_1k_frames 0.000697735 0.00070409 0.0007013529 1.9970231985521767e-06
websocket_decode_125b_100k_frames 0.119051312 0.12004384 0.11959761799999999 0.00033961238858537957
websocket_decode_125b_with_a_masking_key_100k_frames 0.122195596 0.123041478 0.12273015270000001 0.0002784982163657401
websocket_decode_64kb_100k_frames 0.122041139 0.123030305 0.1224164364 0.00032727684841878666
websocket_decode_64kb_with_a_masking_key_100k_frames 0.125007532 0.128055652 0.1272740631 0.0009679683913441752
websocket_decode_64kb_+1_100k_frames 0.121952064 0.123049963 0.1223310711 0.00031968255092042284
websocket_decode_64kb_+1_with_a_masking_key_100k_frames 0.124993864 0.126078283 0.1255403578 0.00038035781081643163
circular_buffer_into_byte_buffer_1kb 0.041222756 0.041674157 0.04132747 0.00018054324586154553
circular_buffer_into_byte_buffer_1mb 0.082244899 0.082997928 0.0824784682 0.0002778008766976006
byte_buffer_view_iterator_1mb 0.020484019 0.020910995 0.0205378353 0.0001313683540989912
byte_to_message_decoder_decode_many_small 0.174345342 0.174853969 0.1747479598 0.0001446329649575127
generate_10k_random_request_keys 0.09094436 0.091239844 0.0910845574 0.00010472229384339478
bytebuffer_rw_10_uint32s 0.308518638 0.310017603 0.3091071579 0.0005574002890834516
bytebuffer_multi_rw_10_uint32s 0.056556237 0.05841896 0.0573386324 0.0005603697128281961
lock_1_thread_10M_ops 0.159168386 0.15944426 0.1593327507 8.532988336782851e-05
lock_2_threads_10M_ops 0.909684488 0.993412226 0.9344311552000001 0.025449024830318658
lock_4_threads_10M_ops 0.880372629 0.911457558 0.8996642762 0.009268312942685882
lock_8_threads_10M_ops 0.981412274 1.00007029 0.9892062211000001 0.006621704391007182
schedule_10000_tasks 0.0081721 0.010546303 0.0092304138 0.0007320914907949687
schedule_and_run_10000_tasks 0.025169612 0.026857235 0.026302208900000002 0.0004644719659597814
execute_10000 0.012078399 0.012113342 0.0120991849 1.12282952149171e-05

comparison

name current previous winner diff
write_http_headers 0.004150245 0.004161533 current 0%
http_headers_canonical_form 0.088151665 0.088032625 previous 0%
http_headers_canonical_form_trimming_whitespace 0.165001179 0.166605663 current 0%
http_headers_canonical_form_trimming_whitespace_from_short_string 0.151172276 0.152258807 current 0%
http_headers_canonical_form_trimming_whitespace_from_long_string 0.233074251 0.236200021 current -1%
bytebuffer_write_12MB_short_string_literals 0.514837219 0.526864105 current -2%
bytebuffer_write_12MB_short_calculated_strings 0.512420607 0.527654621 current -2%
bytebuffer_write_12MB_medium_string_literals 0.175086627 0.178030343 current -1%
bytebuffer_write_12MB_medium_calculated_strings 0.228015571 0.228324955 current 0%
bytebuffer_write_12MB_large_calculated_strings 0.146718247 0.1485951 current -1%
bytebuffer_lots_of_rw 0.446916403 0.448509118 current 0%
bytebuffer_write_http_response_ascii_only_as_string 0.041546108 0.04086237 previous 1%
bytebuffer_write_http_response_ascii_only_as_staticstring 0.032034232 0.032234329 current 0%
bytebuffer_write_http_response_some_nonascii_as_string 0.040761377 0.039979649 previous 1%
bytebuffer_write_http_response_some_nonascii_as_staticstring 0.031636279 0.031161206 previous 1%
no-net_http1_10k_reqs_1_conn 0.112445435 0.108638033 previous 3%
http1_10k_reqs_1_conn 0.608434794 0.606939724 previous 0%
http1_10k_reqs_100_conns 0.597905967 0.599890175 current 0%
future_whenallsucceed_100k_immediately_succeeded_off_loop 0.073521312 0.07269098 previous 1%
future_whenallsucceed_100k_immediately_succeeded_on_loop 0.073888963 0.072607496 previous 1%
future_whenallsucceed_100k_deferred_off_loop 0.279554869 0.281460284 current 0%
future_whenallsucceed_100k_deferred_on_loop 0.126860704 0.127201293 current 0%
future_whenallcomplete_100k_immediately_succeeded_off_loop 0.030937702 0.031101833 current 0%
future_whenallcomplete_100k_immediately_succeeded_on_loop 0.030807059 0.030881767 current 0%
future_whenallcomplete_100k_deferred_off_loop 0.204846221 0.204709938 previous 0%
future_whenallcomplete_100k_deferred_on_loop 0.063921831 0.064252127 current 0%
future_reduce_10k_futures 0.037288194 0.036599588 previous 1%
future_reduce_into_10k_futures 0.03699427 0.036464604 previous 1%
channel_pipeline_1m_events 0.096576897 0.097139711 current 0%
websocket_encode_50b_space_at_front_1m_frames_cow 0.497076788 0.49723517 current 0%
websocket_encode_50b_space_at_front_1m_frames_cow_masking 0.065933174 0.06543051 previous 0%
websocket_encode_1kb_space_at_front_100k_frames_cow 0.05264102 0.052535648 previous 0%
websocket_encode_50b_no_space_at_front_1m_frames_cow 0.497166776 0.496077749 previous 0%
websocket_encode_1kb_no_space_at_front_100k_frames_cow 0.053062186 0.052500886 previous 1%
websocket_encode_50b_space_at_front_10k_frames 0.006526258 0.006527621 current 0%
websocket_encode_50b_space_at_front_10k_frames_masking 0.081560789 0.080652866 previous 1%
websocket_encode_1kb_space_at_front_1k_frames 0.000769075 0.000753354 previous 2%
websocket_encode_50b_no_space_at_front_10k_frames 0.006504746 0.006491826 previous 0%
websocket_encode_1kb_no_space_at_front_1k_frames 0.000697735 0.000698582 current 0%
websocket_decode_125b_100k_frames 0.119051312 0.116003238 previous 2%
websocket_decode_125b_with_a_masking_key_100k_frames 0.122195596 0.118769877 previous 2%
websocket_decode_64kb_100k_frames 0.122041139 0.119039292 previous 2%
websocket_decode_64kb_with_a_masking_key_100k_frames 0.125007532 0.121086765 previous 3%
websocket_decode_64kb_+1_100k_frames 0.121952064 0.118274354 previous 3%
websocket_decode_64kb_+1_with_a_masking_key_100k_frames 0.124993864 0.121695924 previous 2%
circular_buffer_into_byte_buffer_1kb 0.041222756 0.041228652 current 0%
circular_buffer_into_byte_buffer_1mb 0.082244899 0.08225109 current 0%
byte_buffer_view_iterator_1mb 0.020484019 0.020484393 current 0%
byte_to_message_decoder_decode_many_small 0.174345342 0.174993564 current 0%
generate_10k_random_request_keys 0.09094436 0.090469286 previous 0%
bytebuffer_rw_10_uint32s 0.308518638 0.304466491 previous 1%
bytebuffer_multi_rw_10_uint32s 0.056556237 0.057561737 current -1%
lock_1_thread_10M_ops 0.159168386 0.159159621 previous 0%
lock_2_threads_10M_ops 0.909684488 0.9366151 current -2%
lock_4_threads_10M_ops 0.880372629 0.86817247 previous 1%
lock_8_threads_10M_ops 0.981412274 0.916392903 previous 7%
schedule_10000_tasks 0.0081721 n/a n/a n/a%
schedule_and_run_10000_tasks 0.025169612 n/a n/a n/a%
execute_10000 0.012078399 n/a n/a n/a%

significant differences found

@Lukasa Lukasa merged commit 213eb68 into apple:main Dec 13, 2021
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 13, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 13, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
FranzBusch added a commit to FranzBusch/swift-nio that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR apple#2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
Lukasa pushed a commit that referenced this pull request Dec 14, 2021
### Motivation:

In my previous PR #2009, I added baseline performance and allocation tests around `scheduleTask` and `execute`. After analysing, the various allocations that happen when scheduling a task there were only a few that could be optimized away potentially.

### Modifications:

This PR converts the `ScheduledTask` class to a struct which will reduce the number of allocations for scheduling tasks by 1. The only thing that needs to be worked around when converting to a struct is giving it an identity so that we can implement `Equatable` conformance properly. I explored two options. First, using an `ObjectIdentifier` passed to the init. Second, using an atomic counter per EventLoop. I went with the latter since the former requires an additional allocation in the case of calling `execute`

### Result:

`scheduleTask` and `execute` require one less allocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants