• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 (ping_udp1)
27 BENCHMARK_DECLARE (ping_udp10)
28 BENCHMARK_DECLARE (ping_udp100)
29 BENCHMARK_DECLARE (tcp_write_batch)
30 BENCHMARK_DECLARE (tcp4_pound_100)
31 BENCHMARK_DECLARE (tcp4_pound_1000)
32 BENCHMARK_DECLARE (pipe_pound_100)
33 BENCHMARK_DECLARE (pipe_pound_1000)
34 BENCHMARK_DECLARE (tcp_pump100_client)
35 BENCHMARK_DECLARE (tcp_pump1_client)
36 BENCHMARK_DECLARE (pipe_pump100_client)
37 BENCHMARK_DECLARE (pipe_pump1_client)
38 
39 BENCHMARK_DECLARE (tcp_multi_accept2)
40 BENCHMARK_DECLARE (tcp_multi_accept4)
41 BENCHMARK_DECLARE (tcp_multi_accept8)
42 
43 /* Run until X packets have been sent/received. */
44 BENCHMARK_DECLARE (udp_pummel_1v1)
45 BENCHMARK_DECLARE (udp_pummel_1v10)
46 BENCHMARK_DECLARE (udp_pummel_1v100)
47 BENCHMARK_DECLARE (udp_pummel_1v1000)
48 BENCHMARK_DECLARE (udp_pummel_10v10)
49 BENCHMARK_DECLARE (udp_pummel_10v100)
50 BENCHMARK_DECLARE (udp_pummel_10v1000)
51 BENCHMARK_DECLARE (udp_pummel_100v100)
52 BENCHMARK_DECLARE (udp_pummel_100v1000)
53 BENCHMARK_DECLARE (udp_pummel_1000v1000)
54 
55 /* Run until X seconds have elapsed. */
56 BENCHMARK_DECLARE (udp_timed_pummel_1v1)
57 BENCHMARK_DECLARE (udp_timed_pummel_1v10)
58 BENCHMARK_DECLARE (udp_timed_pummel_1v100)
59 BENCHMARK_DECLARE (udp_timed_pummel_1v1000)
60 BENCHMARK_DECLARE (udp_timed_pummel_10v10)
61 BENCHMARK_DECLARE (udp_timed_pummel_10v100)
62 BENCHMARK_DECLARE (udp_timed_pummel_10v1000)
63 BENCHMARK_DECLARE (udp_timed_pummel_100v100)
64 BENCHMARK_DECLARE (udp_timed_pummel_100v1000)
65 BENCHMARK_DECLARE (udp_timed_pummel_1000v1000)
66 
67 BENCHMARK_DECLARE (getaddrinfo)
68 BENCHMARK_DECLARE (fs_stat)
69 BENCHMARK_DECLARE (async1)
70 BENCHMARK_DECLARE (async2)
71 BENCHMARK_DECLARE (async4)
72 BENCHMARK_DECLARE (async8)
73 BENCHMARK_DECLARE (async_pummel_1)
74 BENCHMARK_DECLARE (async_pummel_2)
75 BENCHMARK_DECLARE (async_pummel_4)
76 BENCHMARK_DECLARE (async_pummel_8)
77 BENCHMARK_DECLARE (queue_work)
78 BENCHMARK_DECLARE (spawn)
79 BENCHMARK_DECLARE (thread_create)
80 BENCHMARK_DECLARE (million_async)
81 BENCHMARK_DECLARE (million_timers)
82 HELPER_DECLARE    (tcp4_blackhole_server)
83 HELPER_DECLARE    (tcp_pump_server)
84 HELPER_DECLARE    (pipe_pump_server)
85 HELPER_DECLARE    (tcp4_echo_server)
86 HELPER_DECLARE    (pipe_echo_server)
87 
88 TASK_LIST_START
89   BENCHMARK_ENTRY  (sizes)
90   BENCHMARK_ENTRY  (loop_count)
91   BENCHMARK_ENTRY  (loop_count_timed)
92 
93   BENCHMARK_ENTRY  (ping_pongs)
94   BENCHMARK_HELPER (ping_pongs, tcp4_echo_server)
95 
96   BENCHMARK_ENTRY  (ping_udp1)
97   BENCHMARK_ENTRY  (ping_udp10)
98   BENCHMARK_ENTRY  (ping_udp100)
99 
100   BENCHMARK_ENTRY  (tcp_write_batch)
101   BENCHMARK_HELPER (tcp_write_batch, tcp4_blackhole_server)
102 
103   BENCHMARK_ENTRY  (tcp_pump100_client)
104   BENCHMARK_HELPER (tcp_pump100_client, tcp_pump_server)
105 
106   BENCHMARK_ENTRY  (tcp_pump1_client)
107   BENCHMARK_HELPER (tcp_pump1_client, tcp_pump_server)
108 
109   BENCHMARK_ENTRY  (tcp4_pound_100)
110   BENCHMARK_HELPER (tcp4_pound_100, tcp4_echo_server)
111 
112   BENCHMARK_ENTRY  (tcp4_pound_1000)
113   BENCHMARK_HELPER (tcp4_pound_1000, tcp4_echo_server)
114 
115   BENCHMARK_ENTRY  (pipe_pump100_client)
116   BENCHMARK_HELPER (pipe_pump100_client, pipe_pump_server)
117 
118   BENCHMARK_ENTRY  (pipe_pump1_client)
119   BENCHMARK_HELPER (pipe_pump1_client, pipe_pump_server)
120 
121   BENCHMARK_ENTRY  (pipe_pound_100)
122   BENCHMARK_HELPER (pipe_pound_100, pipe_echo_server)
123 
124   BENCHMARK_ENTRY  (pipe_pound_1000)
125   BENCHMARK_HELPER (pipe_pound_1000, pipe_echo_server)
126 
127   BENCHMARK_ENTRY  (tcp_multi_accept2)
128   BENCHMARK_ENTRY  (tcp_multi_accept4)
129   BENCHMARK_ENTRY  (tcp_multi_accept8)
130 
131   BENCHMARK_ENTRY  (udp_pummel_1v1)
132   BENCHMARK_ENTRY  (udp_pummel_1v10)
133   BENCHMARK_ENTRY  (udp_pummel_1v100)
134   BENCHMARK_ENTRY  (udp_pummel_1v1000)
135   BENCHMARK_ENTRY  (udp_pummel_10v10)
136   BENCHMARK_ENTRY  (udp_pummel_10v100)
137   BENCHMARK_ENTRY  (udp_pummel_10v1000)
138   BENCHMARK_ENTRY  (udp_pummel_100v100)
139   BENCHMARK_ENTRY  (udp_pummel_100v1000)
140   BENCHMARK_ENTRY  (udp_pummel_1000v1000)
141 
142   BENCHMARK_ENTRY  (udp_timed_pummel_1v1)
143   BENCHMARK_ENTRY  (udp_timed_pummel_1v10)
144   BENCHMARK_ENTRY  (udp_timed_pummel_1v100)
145   BENCHMARK_ENTRY  (udp_timed_pummel_1v1000)
146   BENCHMARK_ENTRY  (udp_timed_pummel_10v10)
147   BENCHMARK_ENTRY  (udp_timed_pummel_10v100)
148   BENCHMARK_ENTRY  (udp_timed_pummel_10v1000)
149   BENCHMARK_ENTRY  (udp_timed_pummel_100v100)
150   BENCHMARK_ENTRY  (udp_timed_pummel_100v1000)
151   BENCHMARK_ENTRY  (udp_timed_pummel_1000v1000)
152 
153   BENCHMARK_ENTRY  (getaddrinfo)
154 
155   BENCHMARK_ENTRY  (fs_stat)
156 
157   BENCHMARK_ENTRY  (async1)
158   BENCHMARK_ENTRY  (async2)
159   BENCHMARK_ENTRY  (async4)
160   BENCHMARK_ENTRY  (async8)
161   BENCHMARK_ENTRY  (async_pummel_1)
162   BENCHMARK_ENTRY  (async_pummel_2)
163   BENCHMARK_ENTRY  (async_pummel_4)
164   BENCHMARK_ENTRY  (async_pummel_8)
165   BENCHMARK_ENTRY  (queue_work)
166 
167   BENCHMARK_ENTRY  (spawn)
168   BENCHMARK_ENTRY  (thread_create)
169   BENCHMARK_ENTRY  (million_async)
170   BENCHMARK_ENTRY  (million_timers)
171 TASK_LIST_END
172