Skip to content
Newer
Older
100644 351 lines (264 sloc) 7.75 KB
a706a66 accept benchmark
Igor Zinkovsky authored Aug 5, 2011
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 #include "task.h"
23 #include "uv.h"
24
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
25 /* Update this is you're going to run > 1000 concurrent requests. */
26 #define MAX_CONNS 1000
27
d358738 @bnoordhuis bench: #undef NANOSEC, defined in time.h on solaris
bnoordhuis authored Aug 11, 2011
28 #undef NANOSEC
59cda86 @bnoordhuis unix, test: make NANOSEC a 64 bits unsigned int
bnoordhuis authored Jun 7, 2012
29 #define NANOSEC ((uint64_t) 1e9)
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
30
d4bfcc2 @bnoordhuis bench: fix compiler warnings
bnoordhuis authored Nov 11, 2011
31 #undef DEBUG
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 13, 2011
32 #define DEBUG 0
33
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
34 struct conn_rec_s;
35
36 typedef void (*setup_fn)(int num, void* arg);
37 typedef void (*make_connect_fn)(struct conn_rec_s* conn);
38 typedef int (*connect_fn)(int num, make_connect_fn make_connect, void* arg);
39
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
40 /* Base class for tcp_conn_rec and pipe_conn_rec.
41 * The ordering of fields matters!
42 */
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
43 typedef struct conn_rec_s {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
44 int i;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
45 uv_connect_t conn_req;
46 uv_write_t write_req;
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
47 make_connect_fn make_connect;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
48 uv_stream_t stream;
49 } conn_rec;
50
51 typedef struct {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
52 int i;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
53 uv_connect_t conn_req;
54 uv_write_t write_req;
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
55 make_connect_fn make_connect;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
56 uv_tcp_t stream;
57 } tcp_conn_rec;
58
59 typedef struct {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
60 int i;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
61 uv_connect_t conn_req;
62 uv_write_t write_req;
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
63 make_connect_fn make_connect;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
64 uv_pipe_t stream;
65 } pipe_conn_rec;
66
67 static char buffer[] = "QS";
68
b44ecf9 @piscisaureus multiplicity: update benchmarks
piscisaureus authored Aug 31, 2011
69 static uv_loop_t* loop;
70
3f8bbb8 @bnoordhuis bench: create separate arrays for TCP and pipe streams
bnoordhuis authored Aug 9, 2011
71 static tcp_conn_rec tcp_conns[MAX_CONNS];
72 static pipe_conn_rec pipe_conns[MAX_CONNS];
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
73
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
74 static uint64_t start; /* in ms */
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
75 static int closed_streams;
76 static int conns_failed;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
77
3fb6612 @bnoordhuis include: uv_alloc_cb now takes uv_buf_t*
bnoordhuis authored Aug 31, 2013
78 static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
79 static void connect_cb(uv_connect_t* conn_req, int status);
b7d027c @bnoordhuis include: uv_read{2}_cb now takes const uv_buf_t*
bnoordhuis authored Aug 31, 2013
80 static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
81 static void close_cb(uv_handle_t* handle);
82
83
3fb6612 @bnoordhuis include: uv_alloc_cb now takes uv_buf_t*
bnoordhuis authored Aug 31, 2013
84 static void alloc_cb(uv_handle_t* handle,
85 size_t suggested_size,
86 uv_buf_t* buf) {
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
87 static char slab[65536];
3fb6612 @bnoordhuis include: uv_alloc_cb now takes uv_buf_t*
bnoordhuis authored Aug 31, 2013
88 buf->base = slab;
89 buf->len = sizeof(slab);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
90 }
91
92
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
93 static void after_write(uv_write_t* req, int status) {
94 if (status != 0) {
3ee4d3f @bnoordhuis unix, windows: return error codes directly
bnoordhuis authored Jun 6, 2013
95 fprintf(stderr, "write error %s\n", uv_err_name(status));
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
96 uv_close((uv_handle_t*)req->handle, close_cb);
97 conns_failed++;
98 return;
99 }
100 }
101
102
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
103 static void connect_cb(uv_connect_t* req, int status) {
104 conn_rec* conn;
105 uv_buf_t buf;
106 int r;
107
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
108 if (status != 0) {
1231193 @ry pound: only display connect errors on DEBUG
ry authored Aug 18, 2011
109 #if DEBUG
3ee4d3f @bnoordhuis unix, windows: return error codes directly
bnoordhuis authored Jun 6, 2013
110 fprintf(stderr, "connect error %s\n", uv_err_name(status));
1231193 @ry pound: only display connect errors on DEBUG
ry authored Aug 18, 2011
111 #endif
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
112 uv_close((uv_handle_t*)req->handle, close_cb);
113 conns_failed++;
114 return;
115 }
116
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
117 ASSERT(req != NULL);
118 ASSERT(status == 0);
119
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
120 conn = (conn_rec*)req->data;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
121 ASSERT(conn != NULL);
122
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
123 #if DEBUG
124 printf("connect_cb %d\n", conn->i);
125 #endif
126
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
127 r = uv_read_start(&conn->stream, alloc_cb, read_cb);
128 ASSERT(r == 0);
129
130 buf.base = buffer;
131 buf.len = sizeof(buffer) - 1;
132
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
133 r = uv_write(&conn->write_req, &conn->stream, &buf, 1, after_write);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
134 ASSERT(r == 0);
135 }
136
137
b7d027c @bnoordhuis include: uv_read{2}_cb now takes const uv_buf_t*
bnoordhuis authored Aug 31, 2013
138 static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
139
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
140 ASSERT(stream != NULL);
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
141
142 #if DEBUG
143 printf("read_cb %d\n", p->i);
144 #endif
145
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
146 uv_close((uv_handle_t*)stream, close_cb);
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
147
3ee4d3f @bnoordhuis unix, windows: return error codes directly
bnoordhuis authored Jun 6, 2013
148 if (nread < 0) {
149 if (nread == UV_EOF) {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
150 ;
3ee4d3f @bnoordhuis unix, windows: return error codes directly
bnoordhuis authored Jun 6, 2013
151 } else if (nread == UV_ECONNRESET) {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
152 conns_failed++;
153 } else {
3ee4d3f @bnoordhuis unix, windows: return error codes directly
bnoordhuis authored Jun 6, 2013
154 fprintf(stderr, "read error %s\n", uv_err_name(nread));
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
155 ASSERT(0);
156 }
157 }
158 }
159
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
160
161 static void close_cb(uv_handle_t* handle) {
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
162 conn_rec* p = (conn_rec*)handle->data;
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
163
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
164 ASSERT(handle != NULL);
165 closed_streams++;
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
166
167 #if DEBUG
168 printf("close_cb %d\n", p->i);
169 #endif
170
b44ecf9 @piscisaureus multiplicity: update benchmarks
piscisaureus authored Aug 31, 2011
171 if (uv_now(loop) - start < 10000) {
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
172 p->make_connect(p);
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
173 }
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
174 }
175
176
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
177 static void tcp_do_setup(int num, void* arg) {
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
178 int i;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
179
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
180 for (i = 0; i < num; i++) {
181 tcp_conns[i].i = i;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
182 }
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
183 }
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
184
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
185
186 static void pipe_do_setup(int num, void* arg) {
187 int i;
188
189 for (i = 0; i < num; i++) {
190 pipe_conns[i].i = i;
191 }
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
192 }
193
194
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
195 static void tcp_make_connect(conn_rec* p) {
196 struct sockaddr_in addr;
255671d @bnoordhuis include: uv_tcp_connect{6} now takes sockaddr_in*
bnoordhuis authored Aug 31, 2013
197 tcp_conn_rec* tp;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
198 int r;
199
255671d @bnoordhuis include: uv_tcp_connect{6} now takes sockaddr_in*
bnoordhuis authored Aug 31, 2013
200 tp = (tcp_conn_rec*) p;
201
b44ecf9 @piscisaureus multiplicity: update benchmarks
piscisaureus authored Aug 31, 2011
202 r = uv_tcp_init(loop, (uv_tcp_t*)&p->stream);
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
203 ASSERT(r == 0);
204
8184076 @bnoordhuis include: uv_ip[46]_addr now takes sockaddr_in*
bnoordhuis authored Aug 31, 2013
205 ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
206
5c675c4 @bnoordhuis include: merge uv_tcp_connect and uv_tcp_connect6
bnoordhuis authored Sep 3, 2013
207 r = uv_tcp_connect(&tp->conn_req,
208 (uv_tcp_t*) &p->stream,
209 (const struct sockaddr*) &addr,
210 connect_cb);
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
211 if (r) {
3ee4d3f @bnoordhuis unix, windows: return error codes directly
bnoordhuis authored Jun 6, 2013
212 fprintf(stderr, "uv_tcp_connect error %s\n", uv_err_name(r));
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
213 ASSERT(0);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
214 }
215
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
216 #if DEBUG
217 printf("make connect %d\n", p->i);
218 #endif
219
220 p->conn_req.data = p;
221 p->write_req.data = p;
222 p->stream.data = p;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
223 }
224
225
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
226 static void pipe_make_connect(conn_rec* p) {
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
227 int r;
228
6921d2f @ry Add argument to uv_pipe_init for IPC, unix impl
ry authored Sep 26, 2011
229 r = uv_pipe_init(loop, (uv_pipe_t*)&p->stream, 0);
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
230 ASSERT(r == 0);
231
f5baf21 @bnoordhuis test: wrap long lines at 80 columns
bnoordhuis authored Sep 11, 2013
232 uv_pipe_connect(&((pipe_conn_rec*) p)->conn_req,
233 (uv_pipe_t*) &p->stream,
234 TEST_PIPENAME,
235 connect_cb);
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
236
237 #if DEBUG
238 printf("make connect %d\n", p->i);
239 #endif
240
241 p->conn_req.data = p;
242 p->write_req.data = p;
243 p->stream.data = p;
244 }
245
246
247 static int tcp_do_connect(int num, make_connect_fn make_connect, void* arg) {
248 int i;
f9eda88 fix for pound benchmark
Igor Zinkovsky authored Aug 8, 2011
249
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
250 for (i = 0; i < num; i++) {
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
251 tcp_make_connect((conn_rec*)&tcp_conns[i]);
252 tcp_conns[i].make_connect = make_connect;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
253 }
254
255 return 0;
256 }
257
258
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
259 static int pipe_do_connect(int num, make_connect_fn make_connect, void* arg) {
260 int i;
f9eda88 fix for pound benchmark
Igor Zinkovsky authored Aug 8, 2011
261
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
262 for (i = 0; i < num; i++) {
263 pipe_make_connect((conn_rec*)&pipe_conns[i]);
264 pipe_conns[i].make_connect = make_connect;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
265 }
266
267 return 0;
268 }
269
270
271 static int pound_it(int concurrency,
272 const char* type,
273 setup_fn do_setup,
274 connect_fn do_connect,
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
275 make_connect_fn make_connect,
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
276 void* arg) {
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
277 double secs;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
278 int r;
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
279 uint64_t start_time; /* in ns */
280 uint64_t end_time;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
281
b44ecf9 @piscisaureus multiplicity: update benchmarks
piscisaureus authored Aug 31, 2011
282 loop = uv_default_loop();
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
283
b44ecf9 @piscisaureus multiplicity: update benchmarks
piscisaureus authored Aug 31, 2011
284 uv_update_time(loop);
285 start = uv_now(loop);
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
286
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
287 /* Run benchmark for at least five seconds. */
cee3cc6 @bnoordhuis bench: use high-res timer in pound benchmark
bnoordhuis authored Aug 9, 2011
288 start_time = uv_hrtime();
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
289
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
290 do_setup(concurrency, arg);
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
291
f6c25a1 Fix pipe-pound and clean-up
Igor Zinkovsky authored Aug 18, 2011
292 r = do_connect(concurrency, make_connect, arg);
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
293 ASSERT(!r);
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
294
4ba03dd @bnoordhuis unix, windows: rename uv_run2 to uv_run
bnoordhuis authored Jan 16, 2013
295 uv_run(loop, UV_RUN_DEFAULT);
ac1ce29 @ry Improve pound benchmark by reconnecting in close_cb
ry authored Aug 14, 2011
296
297 end_time = uv_hrtime();
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
298
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
299 /* Number of fractional seconds it took to run the benchmark. */
300 secs = (double)(end_time - start_time) / NANOSEC;
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
301
65ed582 @bnoordhuis bench: run pound benchmark for at least 5 seconds, track connect fail…
bnoordhuis authored Aug 9, 2011
302 LOGF("%s-conn-pound-%d: %.0f accepts/s (%d failed)\n",
303 type,
304 concurrency,
305 closed_streams / secs,
306 conns_failed);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
307
47eb034 @piscisaureus test: move loop cleanup code to the individual tests
piscisaureus authored Oct 16, 2012
308 MAKE_VALGRIND_HAPPY();
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
309 return 0;
310 }
311
312
313 BENCHMARK_IMPL(tcp4_pound_100) {
f5baf21 @bnoordhuis test: wrap long lines at 80 columns
bnoordhuis authored Sep 11, 2013
314 return pound_it(100,
315 "tcp",
316 tcp_do_setup,
317 tcp_do_connect,
318 tcp_make_connect,
319 NULL);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
320 }
321
322
323 BENCHMARK_IMPL(tcp4_pound_1000) {
f5baf21 @bnoordhuis test: wrap long lines at 80 columns
bnoordhuis authored Sep 11, 2013
324 return pound_it(1000,
325 "tcp",
326 tcp_do_setup,
327 tcp_do_connect,
328 tcp_make_connect,
329 NULL);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
330 }
331
332
333 BENCHMARK_IMPL(pipe_pound_100) {
f5baf21 @bnoordhuis test: wrap long lines at 80 columns
bnoordhuis authored Sep 11, 2013
334 return pound_it(100,
335 "pipe",
336 pipe_do_setup,
337 pipe_do_connect,
338 pipe_make_connect,
339 NULL);
a706a66 accept benchmark
Igor Zinkovsky authored Aug 6, 2011
340 }
341
342
343 BENCHMARK_IMPL(pipe_pound_1000) {
f5baf21 @bnoordhuis test: wrap long lines at 80 columns
bnoordhuis authored Sep 11, 2013
344 return pound_it(1000,
345 "pipe",
346 pipe_do_setup,
347 pipe_do_connect,
348 pipe_make_connect,
349 NULL);
cee3cc6 @bnoordhuis bench: use high-res timer in pound benchmark
bnoordhuis authored Aug 8, 2011
350 }
Something went wrong with that request. Please try again.