Skip to content

Instantly share code, notes, and snippets.

@PeterJohnson
Created September 11, 2017 03:16
Show Gist options
  • Save PeterJohnson/e4805ef548e1cb9939a677ddf14cbfd6 to your computer and use it in GitHub Desktop.
Save PeterJohnson/e4805ef548e1cb9939a677ddf14cbfd6 to your computer and use it in GitHub Desktop.
libuv stats comparison
1..50
ok 1 - sizes
# uv_shutdown_t: 80 bytes
# uv_write_t: 192 bytes
# uv_connect_t: 96 bytes
# uv_udp_send_t: 320 bytes
# uv_tcp_t: 248 bytes
# uv_pipe_t: 264 bytes
# uv_tty_t: 312 bytes
# uv_prepare_t: 120 bytes
# uv_check_t: 120 bytes
# uv_idle_t: 120 bytes
# uv_async_t: 128 bytes
# uv_timer_t: 152 bytes
# uv_fs_poll_t: 104 bytes
# uv_fs_event_t: 136 bytes
# uv_process_t: 136 bytes
# uv_poll_t: 160 bytes
# uv_loop_t: 848 bytes
ok 2 - loop_count
# loop_count: 2000000 ticks in 0.34s (5868157/s)
ok 3 - loop_count_timed
# loop_count: 32139207 ticks (6427841 ticks/s)
ok 4 - ping_pongs
# ping_pongs: 115361 roundtrips/s
ok 5 - tcp_write_batch
# 1000000 write requests in 0.65s.
ok 6 - tcp_pump100_client
# tcp_pump100_server: 44.9 gbit/s
# tcp_pump100_client: 46.0 gbit/s
ok 7 - tcp_pump1_client
# tcp_pump1_server: 60.3 gbit/s
# tcp_pump1_client: 60.3 gbit/s
ok 8 - tcp4_pound_100
# tcp-conn-pound-100: 64104 accepts/s (0 failed)
ok 9 - tcp4_pound_1000
# tcp-conn-pound-1000: 46836 accepts/s (0 failed)
ok 10 - pipe_pump100_client
# pipe_pump100_server: 54.8 gbit/s
# pipe_pump100_client: 54.8 gbit/s
ok 11 - pipe_pump1_client
# pipe_pump1_server: 53.5 gbit/s
# pipe_pump1_client: 53.5 gbit/s
ok 12 - pipe_pound_100
# pipe-conn-pound-100: 164130 accepts/s (0 failed)
ok 13 - pipe_pound_1000
# pipe-conn-pound-1000: 128775 accepts/s (199591 failed)
not ok 14 - tcp_multi_accept2
# exit code 6
# Output from process `tcp_multi_accept2`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-multi-accept.c on line 354: 0 == uv_tcp_connect(&ctx->connect_req, (uv_tcp_t*) &ctx->client_handle, (const struct sockaddr*) &listen_addr, cl_connect_cb)
not ok 15 - tcp_multi_accept4
# exit code 6
# Output from process `tcp_multi_accept4`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-multi-accept.c on line 395: 0 == uv_tcp_connect(&ctx->connect_req, handle, (const struct sockaddr*) &listen_addr, cl_connect_cb)
not ok 16 - tcp_multi_accept8
# exit code 6
# Output from process `tcp_multi_accept8`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-multi-accept.c on line 395: 0 == uv_tcp_connect(&ctx->connect_req, handle, (const struct sockaddr*) &listen_addr, cl_connect_cb)
ok 17 - udp_pummel_1v1
# udp_pummel_1v1: 425895/s received, 425894/s sent. 1000001 received, 1000000 sent in 2.3 seconds.
ok 18 - udp_pummel_1v10
# udp_pummel_10v1: 448029/s received, 448029/s sent. 1000001 received, 1000000 sent in 2.2 seconds.
ok 19 - udp_pummel_1v100
# udp_pummel_100v1: 464684/s received, 464684/s sent. 1000001 received, 1000000 sent in 2.2 seconds.
ok 20 - udp_pummel_1v1000
# udp_pummel_1000v1: 463822/s received, 463822/s sent. 1000001 received, 1000000 sent in 2.2 seconds.
ok 21 - udp_pummel_10v10
# udp_pummel_10v10: 476195/s received, 476190/s sent. 1000010 received, 1000000 sent in 2.1 seconds.
ok 22 - udp_pummel_10v100
# udp_pummel_100v10: 469709/s received, 469704/s sent. 1000010 received, 1000000 sent in 2.1 seconds.
ok 23 - udp_pummel_10v1000
# udp_pummel_1000v10: 487334/s received, 487329/s sent. 1000010 received, 1000000 sent in 2.1 seconds.
ok 24 - udp_pummel_100v100
# udp_pummel_100v100: 437872/s received, 437828/s sent. 1000100 received, 1000000 sent in 2.3 seconds.
not ok 25 - udp_pummel_100v1000
# exit code 6
# Output from process `udp_pummel_100v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
not ok 26 - udp_pummel_1000v1000
# exit code 6
# Output from process `udp_pummel_1000v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
ok 27 - udp_timed_pummel_1v1
# udp_pummel_1v1: 478072/s received, 478072/s sent. 2389883 received, 2389884 sent in 5.0 seconds.
ok 28 - udp_timed_pummel_1v10
# udp_pummel_10v1: 476575/s received, 476575/s sent. 2382397 received, 2382398 sent in 5.0 seconds.
ok 29 - udp_timed_pummel_1v100
# udp_pummel_100v1: 467350/s received, 467350/s sent. 2336281 received, 2336282 sent in 5.0 seconds.
ok 30 - udp_timed_pummel_1v1000
# udp_pummel_1000v1: 461333/s received, 461333/s sent. 2304357 received, 2304358 sent in 5.0 seconds.
ok 31 - udp_timed_pummel_10v10
# udp_pummel_10v10: 478078/s received, 478080/s sent. 2389910 received, 2389920 sent in 5.0 seconds.
ok 32 - udp_timed_pummel_10v100
# udp_pummel_100v10: 481010/s received, 481012/s sent. 2404570 received, 2404580 sent in 5.0 seconds.
ok 33 - udp_timed_pummel_10v1000
# udp_pummel_1000v10: 471650/s received, 471652/s sent. 2355890 received, 2355900 sent in 5.0 seconds.
ok 34 - udp_timed_pummel_100v100
# udp_pummel_100v100: 438756/s received, 438776/s sent. 2192900 received, 2193000 sent in 5.0 seconds.
not ok 35 - udp_timed_pummel_100v1000
# exit code 6
# Output from process `udp_timed_pummel_100v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
not ok 36 - udp_timed_pummel_1000v1000
# exit code 6
# Output from process `udp_timed_pummel_1000v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
ok 37 - getaddrinfo
# getaddrinfo: 67568 req/s
ok 38 - fs_stat
# 1,000,000 stats (sync): 0.30s (3,286,171/s)
# 100,000 stats (1 concurrent): 0.53s (188,237/s)
# 100,000 stats (2 concurrent): 0.29s (348,106/s)
# 100,000 stats (3 concurrent): 0.25s (401,706/s)
# 100,000 stats (4 concurrent): 0.19s (525,479/s)
# 100,000 stats (5 concurrent): 0.16s (622,788/s)
# 100,000 stats (6 concurrent): 0.15s (689,119/s)
# 100,000 stats (7 concurrent): 0.12s (822,414/s)
# 100,000 stats (8 concurrent): 0.12s (858,316/s)
# 100,000 stats (9 concurrent): 0.12s (816,058/s)
# 100,000 stats (10 concurrent): 0.10s (965,775/s)
# 100,000 stats (11 concurrent): 0.10s (1,014,011/s)
# 100,000 stats (12 concurrent): 0.10s (1,026,437/s)
# 100,000 stats (13 concurrent): 0.10s (995,575/s)
# 100,000 stats (14 concurrent): 0.09s (1,065,882/s)
# 100,000 stats (15 concurrent): 0.09s (1,139,762/s)
# 100,000 stats (16 concurrent): 0.09s (1,175,369/s)
# 100,000 stats (17 concurrent): 0.08s (1,185,342/s)
# 100,000 stats (18 concurrent): 0.08s (1,206,098/s)
# 100,000 stats (19 concurrent): 0.08s (1,222,042/s)
# 100,000 stats (20 concurrent): 0.08s (1,229,246/s)
# <buffer too small> stats (21 concurrent): 0.08s (1,254,101/s)
# <buffer too small> stats (22 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (23 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (24 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (25 concurrent): 0.07s (<buffer too small>/s)
# <buffer too small> stats (26 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (27 concurrent): 0.09s (<buffer too small>/s)
# <buffer too small> stats (28 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (29 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (30 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (31 concurrent): 0.08s (<buffer too small>/s)
# <buffer too small> stats (32 concurrent): 0.08s (<buffer too small>/s)
ok 39 - async1
# async1: 4.43 sec (225,716/sec)
ok 40 - async2
# async2: 5.00 sec (199,830/sec)
ok 41 - async4
# async4: 5.39 sec (185,611/sec)
ok 42 - async8
# async8: 9.80 sec (102,076/sec)
ok 43 - async_pummel_1
# async_pummel_1: 1,000,000 callbacks in 2.13 seconds (468,831/sec)
ok 44 - async_pummel_2
# async_pummel_2: 1,000,000 callbacks in 0.84 seconds (1,193,167/sec)
ok 45 - async_pummel_4
# async_pummel_4: 1,000,000 callbacks in 2.12 seconds (471,557/sec)
ok 46 - async_pummel_8
# async_pummel_8: 1,000,000 callbacks in 2.39 seconds (418,736/sec)
ok 47 - spawn
# spawn: 912 spawns/s
ok 48 - thread_create
# 20000 threads created in 0.18 seconds (110431/s)
ok 49 - million_async
# 15,666,611 async events in 5.0 seconds (3,133,322/s, 1,048,576 unique handles seen)
ok 50 - million_timers
# 11.10 seconds total
# 1.78 seconds init
# 8.82 seconds dispatch
# 0.49 seconds cleanup
1..50
ok 1 - sizes
# uv_shutdown_t: 40 bytes
# uv_write_t: 100 bytes
# uv_connect_t: 48 bytes
# uv_udp_send_t: 224 bytes
# uv_tcp_t: 132 bytes
# uv_pipe_t: 140 bytes
# uv_tty_t: 196 bytes
# uv_prepare_t: 60 bytes
# uv_check_t: 60 bytes
# uv_idle_t: 60 bytes
# uv_async_t: 64 bytes
# uv_timer_t: 88 bytes
# uv_fs_poll_t: 52 bytes
# uv_fs_event_t: 68 bytes
# uv_process_t: 68 bytes
# uv_poll_t: 84 bytes
# uv_loop_t: 472 bytes
ok 2 - loop_count
# loop_count: 2000000 ticks in 9.98s (200303/s)
ok 3 - loop_count_timed
# loop_count: 1000038 ticks (200008 ticks/s)
ok 4 - ping_pongs
# ping_pongs: 6326 roundtrips/s
not ok 5 - tcp_write_batch
# exit code 6
# Output from process `tcp_write_batch`: (no output)
Output from process `tcp_write_batch`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-tcp-write-batch.c on line 106: write_reqs != NULL
ok 6 - tcp_pump100_client
# tcp_pump100_client: 1.2 gbit/s
ok 7 - tcp_pump1_client
# tcp_pump1_server: 1.6 gbit/s
# tcp_pump1_client: 1.6 gbit/s
ok 8 - tcp4_pound_100
# tcp-conn-pound-100: 2433 accepts/s (0 failed)
ok 9 - tcp4_pound_1000
# tcp-conn-pound-1000: 1255 accepts/s (0 failed)
ok 10 - pipe_pump100_client
# pipe_pump100_server: 1.9 gbit/s
# pipe_pump100_client: 1.9 gbit/s
ok 11 - pipe_pump1_client
# pipe_pump1_server: 2.1 gbit/s
# pipe_pump1_client: 2.1 gbit/s
ok 12 - pipe_pound_100
# pipe-conn-pound-100: 7994 accepts/s (0 failed)
ok 13 - pipe_pound_1000
# pipe-conn-pound-1000: 9203 accepts/s (37527 failed)
not ok 14 - tcp_multi_accept2
# timeout
# Output from process `tcp_multi_accept2`: (no output)
not ok 15 - tcp_multi_accept4
# timeout
# Output from process `tcp_multi_accept4`: (no output)
not ok 16 - tcp_multi_accept8
# timeout
# Output from process `tcp_multi_accept8`: (no output)
ok 17 - udp_pummel_1v1
# udp_pummel_1v1: 17266/s received, 17266/s sent. 1000001 received, 1000000 sent in 57.9 seconds.
ok 18 - udp_pummel_1v10
# udp_pummel_10v1: 17254/s received, 17254/s sent. 1000001 received, 1000000 sent in 58.0 seconds.
ok 19 - udp_pummel_1v100
# udp_pummel_100v1: 17225/s received, 17225/s sent. 1000001 received, 1000000 sent in 58.1 seconds.
ok 20 - udp_pummel_1v1000
# udp_pummel_1000v1: 16970/s received, 16970/s sent. 1000001 received, 1000000 sent in 58.9 seconds.
ok 21 - udp_pummel_10v10
# udp_pummel_10v10: 20115/s received, 20115/s sent. 1000010 received, 1000000 sent in 49.7 seconds.
ok 22 - udp_pummel_10v100
# udp_pummel_100v10: 20227/s received, 20227/s sent. 1000010 received, 1000000 sent in 49.4 seconds.
ok 23 - udp_pummel_10v1000
# udp_pummel_1000v10: 19947/s received, 19947/s sent. 1000010 received, 1000000 sent in 50.1 seconds.
ok 24 - udp_pummel_100v100
# udp_pummel_100v100: 19068/s received, 19066/s sent. 1000100 received, 1000000 sent in 52.5 seconds.
not ok 25 - udp_pummel_100v1000
# exit code 6
# Output from process `udp_pummel_100v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
not ok 26 - udp_pummel_1000v1000
# exit code 6
# Output from process `udp_pummel_1000v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
ok 27 - udp_timed_pummel_1v1
# udp_pummel_1v1: 17284/s received, 17284/s sent. 86401 received, 86402 sent in 5.0 seconds.
ok 28 - udp_timed_pummel_1v10
# udp_pummel_10v1: 17277/s received, 17277/s sent. 86369 received, 86370 sent in 5.0 seconds.
ok 29 - udp_timed_pummel_1v100
# udp_pummel_100v1: 17234/s received, 17235/s sent. 86155 received, 86156 sent in 5.0 seconds.
ok 30 - udp_timed_pummel_1v1000
# udp_pummel_1000v1: 16952/s received, 16952/s sent. 84811 received, 84812 sent in 5.0 seconds.
ok 31 - udp_timed_pummel_10v10
# udp_pummel_10v10: 20178/s received, 20180/s sent. 100870 received, 100880 sent in 5.0 seconds.
ok 32 - udp_timed_pummel_10v100
# udp_pummel_100v10: 20258/s received, 20260/s sent. 101270 received, 101280 sent in 5.0 seconds.
ok 33 - udp_timed_pummel_10v1000
# udp_pummel_1000v10: 19838/s received, 19840/s sent. 99250 received, 99260 sent in 5.0 seconds.
ok 34 - udp_timed_pummel_100v100
# udp_pummel_100v100: 19115/s received, 19135/s sent. 95500 received, 95600 sent in 5.0 seconds.
not ok 35 - udp_timed_pummel_100v1000
# exit code 6
# Output from process `udp_timed_pummel_100v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
not ok 36 - udp_timed_pummel_1000v1000
# exit code 6
# Output from process `udp_timed_pummel_1000v1000`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-udp-pummel.c on line 199: 0 == uv_udp_send(&s->send_req, &s->udp_handle, bufs, ARRAY_SIZE(bufs), (const struct sockaddr*) &s->addr, send_cb)
ok 37 - getaddrinfo
# getaddrinfo: 2990 req/s
ok 38 - fs_stat
# 1,000,000 stats (sync): 5.57s (179,490/s)
# 100,000 stats (1 concurrent): 6.71s (14,893/s)
# 100,000 stats (2 concurrent): 4.65s (21,495/s)
# 100,000 stats (3 concurrent): 3.12s (32,083/s)
# 100,000 stats (4 concurrent): 2.55s (39,186/s)
# 100,000 stats (5 concurrent): 2.26s (44,241/s)
# 100,000 stats (6 concurrent): 1.91s (52,376/s)
# 100,000 stats (7 concurrent): 1.58s (63,293/s)
# 100,000 stats (8 concurrent): 1.37s (73,252/s)
# 100,000 stats (9 concurrent): 1.23s (81,075/s)
# 100,000 stats (10 concurrent): 1.31s (76,294/s)
# 100,000 stats (11 concurrent): 1.11s (90,008/s)
# 100,000 stats (12 concurrent): 1.26s (79,230/s)
# 100,000 stats (13 concurrent): 1.13s (88,614/s)
# 100,000 stats (14 concurrent): 1.18s (85,100/s)
# 100,000 stats (15 concurrent): 1.30s (77,089/s)
# 100,000 stats (16 concurrent): 1.20s (83,498/s)
# 100,000 stats (17 concurrent): 1.11s (90,335/s)
# 100,000 stats (18 concurrent): 1.17s (85,617/s)
# 100,000 stats (19 concurrent): 1.10s (90,967/s)
# 100,000 stats (20 concurrent): 1.13s (<buffer too small>/s)
# <buffer too small> stats (21 concurrent): 0.99s (<buffer too small>/s)
# <buffer too small> stats (22 concurrent): 1.08s (<buffer too small>/s)
# <buffer too small> stats (23 concurrent): 1.05s (<buffer too small>/s)
# <buffer too small> stats (24 concurrent): 1.07s (<buffer too small>/s)
# <buffer too small> stats (25 concurrent): 1.16s (<buffer too small>/s)
# <buffer too small> stats (26 concurrent): 1.14s (<buffer too small>/s)
# <buffer too small> stats (27 concurrent): 1.15s (<buffer too small>/s)
# <buffer too small> stats (28 concurrent): 1.14s (<buffer too small>/s)
# <buffer too small> stats (29 concurrent): 1.11s (<buffer too small>/s)
# <buffer too small> stats (30 concurrent): 1.10s (<buffer too small>/s)
# <buffer too small> stats (31 concurrent): 1.18s (<buffer too small>/s)
# <buffer too small> stats (32 concurrent): 1.08s (<buffer too small>/s)
not ok 39 - async1
# timeout
# Output from process `async1`: (no output)
not ok 40 - async2
# timeout
# Output from process `async2`: (no output)
not ok 41 - async4
# timeout
# Output from process `async4`: (no output)
not ok 42 - async8
# timeout
# Output from process `async8`: (no output)
ok 43 - async_pummel_1
# async_pummel_1: 1,000,000 callbacks in 16.62 seconds (60,175/sec)
ok 44 - async_pummel_2
# async_pummel_2: 1,000,000 callbacks in 32.10 seconds (31,151/sec)
ok 45 - async_pummel_4
# async_pummel_4: 1,000,000 callbacks in 48.12 seconds (20,782/sec)
not ok 46 - async_pummel_8
# timeout
# Output from process `async_pummel_8`: (no output)
ok 47 - spawn
# spawn: 51 spawns/s
ok 48 - thread_create
# 20000 threads created in 2.78 seconds (7191/s)
ok 49 - million_async
# 1,388,171 async events in 5.0 seconds (277,634/s, 1,048,576 unique handles seen)
not ok 50 - million_timers
# exit code 6
# Output from process `million_timers`:
# Assertion failed in /home/peter/project/frc/wpiutil/src/uvbench/native/c/benchmark-million-timers.c on line 52: timers != NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment