1 /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 * 3 * Permission is hereby granted, free of charge, to any person obtaining a copy 4 * of this software and associated documentation files (the "Software"), to 5 * deal in the Software without restriction, including without limitation the 6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 * sell copies of the Software, and to permit persons to whom the Software is 8 * furnished to do so, subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included in 11 * all copies or substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 * IN THE SOFTWARE. 20 */ 21 22 BENCHMARK_DECLARE (sizes) 23 BENCHMARK_DECLARE (loop_count) 24 BENCHMARK_DECLARE (loop_count_timed) 25 BENCHMARK_DECLARE (ping_pongs) 26 BENCHMARK_DECLARE (tcp_write_batch) 27 BENCHMARK_DECLARE (tcp4_pound_100) 28 BENCHMARK_DECLARE (tcp4_pound_1000) 29 BENCHMARK_DECLARE (pipe_pound_100) 30 BENCHMARK_DECLARE (pipe_pound_1000) 31 BENCHMARK_DECLARE (tcp_pump100_client) 32 BENCHMARK_DECLARE (tcp_pump1_client) 33 BENCHMARK_DECLARE (pipe_pump100_client) 34 BENCHMARK_DECLARE (pipe_pump1_client) 35 36 BENCHMARK_DECLARE (tcp_multi_accept2) 37 BENCHMARK_DECLARE (tcp_multi_accept4) 38 BENCHMARK_DECLARE (tcp_multi_accept8) 39 40 /* Run until X packets have been sent/received. */ 41 BENCHMARK_DECLARE (udp_pummel_1v1) 42 BENCHMARK_DECLARE (udp_pummel_1v10) 43 BENCHMARK_DECLARE (udp_pummel_1v100) 44 BENCHMARK_DECLARE (udp_pummel_1v1000) 45 BENCHMARK_DECLARE (udp_pummel_10v10) 46 BENCHMARK_DECLARE (udp_pummel_10v100) 47 BENCHMARK_DECLARE (udp_pummel_10v1000) 48 BENCHMARK_DECLARE (udp_pummel_100v100) 49 BENCHMARK_DECLARE (udp_pummel_100v1000) 50 BENCHMARK_DECLARE (udp_pummel_1000v1000) 51 52 /* Run until X seconds have elapsed. */ 53 BENCHMARK_DECLARE (udp_timed_pummel_1v1) 54 BENCHMARK_DECLARE (udp_timed_pummel_1v10) 55 BENCHMARK_DECLARE (udp_timed_pummel_1v100) 56 BENCHMARK_DECLARE (udp_timed_pummel_1v1000) 57 BENCHMARK_DECLARE (udp_timed_pummel_10v10) 58 BENCHMARK_DECLARE (udp_timed_pummel_10v100) 59 BENCHMARK_DECLARE (udp_timed_pummel_10v1000) 60 BENCHMARK_DECLARE (udp_timed_pummel_100v100) 61 BENCHMARK_DECLARE (udp_timed_pummel_100v1000) 62 BENCHMARK_DECLARE (udp_timed_pummel_1000v1000) 63 64 BENCHMARK_DECLARE (getaddrinfo) 65 BENCHMARK_DECLARE (fs_stat) 66 BENCHMARK_DECLARE (async1) 67 BENCHMARK_DECLARE (async2) 68 BENCHMARK_DECLARE (async4) 69 BENCHMARK_DECLARE (async8) 70 BENCHMARK_DECLARE (async_pummel_1) 71 BENCHMARK_DECLARE (async_pummel_2) 72 BENCHMARK_DECLARE (async_pummel_4) 73 BENCHMARK_DECLARE (async_pummel_8) 74 BENCHMARK_DECLARE (spawn) 75 BENCHMARK_DECLARE (thread_create) 76 BENCHMARK_DECLARE (million_async) 77 BENCHMARK_DECLARE (million_timers) 78 HELPER_DECLARE (tcp4_blackhole_server) 79 HELPER_DECLARE (tcp_pump_server) 80 HELPER_DECLARE (pipe_pump_server) 81 HELPER_DECLARE (tcp4_echo_server) 82 HELPER_DECLARE (pipe_echo_server) 83 HELPER_DECLARE (dns_server) 84 85 TASK_LIST_START 86 BENCHMARK_ENTRY (sizes) 87 BENCHMARK_ENTRY (loop_count) 88 BENCHMARK_ENTRY (loop_count_timed) 89 90 BENCHMARK_ENTRY (ping_pongs) 91 BENCHMARK_HELPER (ping_pongs, tcp4_echo_server) 92 93 BENCHMARK_ENTRY (tcp_write_batch) 94 BENCHMARK_HELPER (tcp_write_batch, tcp4_blackhole_server) 95 96 BENCHMARK_ENTRY (tcp_pump100_client) 97 BENCHMARK_HELPER (tcp_pump100_client, tcp_pump_server) 98 99 BENCHMARK_ENTRY (tcp_pump1_client) 100 BENCHMARK_HELPER (tcp_pump1_client, tcp_pump_server) 101 102 BENCHMARK_ENTRY (tcp4_pound_100) 103 BENCHMARK_HELPER (tcp4_pound_100, tcp4_echo_server) 104 105 BENCHMARK_ENTRY (tcp4_pound_1000) 106 BENCHMARK_HELPER (tcp4_pound_1000, tcp4_echo_server) 107 108 BENCHMARK_ENTRY (pipe_pump100_client) 109 BENCHMARK_HELPER (pipe_pump100_client, pipe_pump_server) 110 111 BENCHMARK_ENTRY (pipe_pump1_client) 112 BENCHMARK_HELPER (pipe_pump1_client, pipe_pump_server) 113 114 BENCHMARK_ENTRY (pipe_pound_100) 115 BENCHMARK_HELPER (pipe_pound_100, pipe_echo_server) 116 117 BENCHMARK_ENTRY (pipe_pound_1000) 118 BENCHMARK_HELPER (pipe_pound_1000, pipe_echo_server) 119 120 BENCHMARK_ENTRY (tcp_multi_accept2) 121 BENCHMARK_ENTRY (tcp_multi_accept4) 122 BENCHMARK_ENTRY (tcp_multi_accept8) 123 124 BENCHMARK_ENTRY (udp_pummel_1v1) 125 BENCHMARK_ENTRY (udp_pummel_1v10) 126 BENCHMARK_ENTRY (udp_pummel_1v100) 127 BENCHMARK_ENTRY (udp_pummel_1v1000) 128 BENCHMARK_ENTRY (udp_pummel_10v10) 129 BENCHMARK_ENTRY (udp_pummel_10v100) 130 BENCHMARK_ENTRY (udp_pummel_10v1000) 131 BENCHMARK_ENTRY (udp_pummel_100v100) 132 BENCHMARK_ENTRY (udp_pummel_100v1000) 133 BENCHMARK_ENTRY (udp_pummel_1000v1000) 134 135 BENCHMARK_ENTRY (udp_timed_pummel_1v1) 136 BENCHMARK_ENTRY (udp_timed_pummel_1v10) 137 BENCHMARK_ENTRY (udp_timed_pummel_1v100) 138 BENCHMARK_ENTRY (udp_timed_pummel_1v1000) 139 BENCHMARK_ENTRY (udp_timed_pummel_10v10) 140 BENCHMARK_ENTRY (udp_timed_pummel_10v100) 141 BENCHMARK_ENTRY (udp_timed_pummel_10v1000) 142 BENCHMARK_ENTRY (udp_timed_pummel_100v100) 143 BENCHMARK_ENTRY (udp_timed_pummel_100v1000) 144 BENCHMARK_ENTRY (udp_timed_pummel_1000v1000) 145 146 BENCHMARK_ENTRY (getaddrinfo) 147 148 BENCHMARK_ENTRY (fs_stat) 149 150 BENCHMARK_ENTRY (async1) 151 BENCHMARK_ENTRY (async2) 152 BENCHMARK_ENTRY (async4) 153 BENCHMARK_ENTRY (async8) 154 BENCHMARK_ENTRY (async_pummel_1) 155 BENCHMARK_ENTRY (async_pummel_2) 156 BENCHMARK_ENTRY (async_pummel_4) 157 BENCHMARK_ENTRY (async_pummel_8) 158 159 BENCHMARK_ENTRY (spawn) 160 BENCHMARK_ENTRY (thread_create) 161 BENCHMARK_ENTRY (million_async) 162 BENCHMARK_ENTRY (million_timers) 163 TASK_LIST_END 164