aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl')
-rw-r--r--src/testcurl/perf_get.c12
-rw-r--r--src/testcurl/perf_get_concurrent.c12
2 files changed, 18 insertions, 6 deletions
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c
index 3da5f605..b215c837 100644
--- a/src/testcurl/perf_get.c
+++ b/src/testcurl/perf_get.c
@@ -226,7 +226,8 @@ testInternalGet (int port, int poll_flag)
226 } 226 }
227 curl_easy_cleanup (c); 227 curl_easy_cleanup (c);
228 } 228 }
229 stop (poll_flag == MHD_USE_POLL ? "internal thread with poll()" : 229 stop (poll_flag == MHD_USE_AUTO ? "internal thread with 'auto'" :
230 poll_flag == MHD_USE_POLL ? "internal thread with poll()" :
230 poll_flag == MHD_USE_EPOLL ? "internal thread with epoll" : "internal thread with select()"); 231 poll_flag == MHD_USE_EPOLL ? "internal thread with epoll" : "internal thread with select()");
231 MHD_stop_daemon (d); 232 MHD_stop_daemon (d);
232 if (cbc.pos != strlen ("/hello_world")) 233 if (cbc.pos != strlen ("/hello_world"))
@@ -286,7 +287,8 @@ testMultithreadedGet (int port, int poll_flag)
286 } 287 }
287 curl_easy_cleanup (c); 288 curl_easy_cleanup (c);
288 } 289 }
289 stop ((poll_flag & MHD_USE_POLL) ? "internal thread with poll() and thread per connection" : 290 stop ((poll_flag & MHD_USE_AUTO) ? "internal thread with 'auto' and thread per connection" :
291 (poll_flag & MHD_USE_POLL) ? "internal thread with poll() and thread per connection" :
290 (poll_flag & MHD_USE_EPOLL) ? "internal thread with epoll and thread per connection" : 292 (poll_flag & MHD_USE_EPOLL) ? "internal thread with epoll and thread per connection" :
291 "internal thread with select() and thread per connection"); 293 "internal thread with select() and thread per connection");
292 MHD_stop_daemon (d); 294 MHD_stop_daemon (d);
@@ -347,7 +349,8 @@ testMultithreadedPoolGet (int port, int poll_flag)
347 } 349 }
348 curl_easy_cleanup (c); 350 curl_easy_cleanup (c);
349 } 351 }
350 stop (0 != (poll_flag & MHD_USE_POLL) ? "internal thread pool with poll()" : 352 stop (0 != (poll_flag & MHD_USE_AUTO) ? "internal thread pool with 'auto'" :
353 0 != (poll_flag & MHD_USE_POLL) ? "internal thread pool with poll()" :
351 0 != (poll_flag & MHD_USE_EPOLL) ? "internal thread pool with epoll" : "internal thread pool with select()"); 354 0 != (poll_flag & MHD_USE_EPOLL) ? "internal thread pool with epoll" : "internal thread pool with select()");
352 MHD_stop_daemon (d); 355 MHD_stop_daemon (d);
353 if (cbc.pos != strlen ("/hello_world")) 356 if (cbc.pos != strlen ("/hello_world"))
@@ -521,6 +524,9 @@ main (int argc, char *const *argv)
521 "/hello_world", 524 "/hello_world",
522 MHD_RESPMEM_MUST_COPY); 525 MHD_RESPMEM_MUST_COPY);
523 errorCount += testExternalGet (port++); 526 errorCount += testExternalGet (port++);
527 errorCount += testInternalGet (port++, MHD_USE_AUTO);
528 errorCount += testMultithreadedGet (port++, MHD_USE_AUTO);
529 errorCount += testMultithreadedPoolGet (port++, MHD_USE_AUTO);
524 errorCount += testInternalGet (port++, 0); 530 errorCount += testInternalGet (port++, 0);
525 errorCount += testMultithreadedGet (port++, 0); 531 errorCount += testMultithreadedGet (port++, 0);
526 errorCount += testMultithreadedPoolGet (port++, 0); 532 errorCount += testMultithreadedPoolGet (port++, 0);
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c
index ebc76841..d75feb75 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -233,7 +233,8 @@ static int
233testInternalGet (int port, int poll_flag) 233testInternalGet (int port, int poll_flag)
234{ 234{
235 struct MHD_Daemon *d; 235 struct MHD_Daemon *d;
236 const char * const test_desc = ((poll_flag & MHD_USE_POLL) ? "internal thread with poll()" : 236 const char * const test_desc = ((poll_flag & MHD_USE_AUTO) ? "internal thread with 'auto'" :
237 (poll_flag & MHD_USE_POLL) ? "internal thread with poll()" :
237 (poll_flag & MHD_USE_EPOLL) ? "internal thread with epoll" : "internal thread with select()"); 238 (poll_flag & MHD_USE_EPOLL) ? "internal thread with epoll" : "internal thread with select()");
238 const char * ret_val; 239 const char * ret_val;
239 240
@@ -260,7 +261,8 @@ static int
260testMultithreadedGet (int port, int poll_flag) 261testMultithreadedGet (int port, int poll_flag)
261{ 262{
262 struct MHD_Daemon *d; 263 struct MHD_Daemon *d;
263 const char * const test_desc = ((poll_flag & MHD_USE_POLL) ? "internal thread with poll() and thread per connection" : 264 const char * const test_desc = ((poll_flag & MHD_USE_AUTO) ? "internal thread with 'auto' and thread per connection" :
265 (poll_flag & MHD_USE_POLL) ? "internal thread with poll() and thread per connection" :
264 (poll_flag & MHD_USE_EPOLL) ? "internal thread with epoll and thread per connection" 266 (poll_flag & MHD_USE_EPOLL) ? "internal thread with epoll and thread per connection"
265 : "internal thread with select() and thread per connection"); 267 : "internal thread with select() and thread per connection");
266 const char * ret_val; 268 const char * ret_val;
@@ -287,7 +289,8 @@ static int
287testMultithreadedPoolGet (int port, int poll_flag) 289testMultithreadedPoolGet (int port, int poll_flag)
288{ 290{
289 struct MHD_Daemon *d; 291 struct MHD_Daemon *d;
290 const char * const test_desc = ((poll_flag & MHD_USE_POLL) ? "internal thread pool with poll()" : 292 const char * const test_desc = ((poll_flag & MHD_USE_AUTO) ? "internal thread pool with 'auto'" :
293 (poll_flag & MHD_USE_POLL) ? "internal thread pool with poll()" :
291 (poll_flag & MHD_USE_EPOLL) ? "internal thread poll with epoll" : "internal thread pool with select()"); 294 (poll_flag & MHD_USE_EPOLL) ? "internal thread poll with epoll" : "internal thread pool with select()");
292 const char * ret_val; 295 const char * ret_val;
293 296
@@ -395,6 +398,9 @@ main (int argc, char *const *argv)
395 errorCount += testMultithreadedGet (port++, 0); 398 errorCount += testMultithreadedGet (port++, 0);
396 errorCount += testMultithreadedPoolGet (port++, 0); 399 errorCount += testMultithreadedPoolGet (port++, 0);
397 errorCount += testExternalGet (port++); 400 errorCount += testExternalGet (port++);
401 errorCount += testInternalGet (port++, MHD_USE_AUTO);
402 errorCount += testMultithreadedGet (port++, MHD_USE_AUTO);
403 errorCount += testMultithreadedPoolGet (port++, MHD_USE_AUTO);
398 if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL)) 404 if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL))
399 { 405 {
400 errorCount += testInternalGet (port++, MHD_USE_POLL); 406 errorCount += testInternalGet (port++, MHD_USE_POLL);