diff options
Diffstat (limited to 'src/testcurl/test_post_loop.c')
-rw-r--r-- | src/testcurl/test_post_loop.c | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index 6da06b45..aae297d4 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -583,36 +583,39 @@ main (int argc, char *const *argv) | |||
583 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 583 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |
584 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 584 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
585 | return 2; | 585 | return 2; |
586 | start_time = now(); | 586 | if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_THREADS)) |
587 | errorCount += testInternalPost (); | 587 | { |
588 | fprintf (stderr, | 588 | start_time = now(); |
589 | oneone ? "%s: Sequential POSTs (http/1.1) %f/s\n" : "%s: Sequential POSTs (http/1.0) %f/s\n", | 589 | errorCount += testInternalPost (); |
590 | "internal select", | 590 | fprintf (stderr, |
591 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0)); | 591 | oneone ? "%s: Sequential POSTs (http/1.1) %f/s\n" : "%s: Sequential POSTs (http/1.0) %f/s\n", |
592 | GAUGER ("internal select", | 592 | "internal select", |
593 | oneone ? "Sequential POSTs (http/1.1)" : "Sequential POSTs (http/1.0)", | 593 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0)); |
594 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0), | 594 | GAUGER ("internal select", |
595 | "requests/s"); | 595 | oneone ? "Sequential POSTs (http/1.1)" : "Sequential POSTs (http/1.0)", |
596 | start_time = now(); | 596 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0), |
597 | errorCount += testMultithreadedPost (); | 597 | "requests/s"); |
598 | fprintf (stderr, | 598 | start_time = now(); |
599 | oneone ? "%s: Sequential POSTs (http/1.1) %f/s\n" : "%s: Sequential POSTs (http/1.0) %f/s\n", | 599 | errorCount += testMultithreadedPost (); |
600 | "multithreaded post", | 600 | fprintf (stderr, |
601 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0)); | 601 | oneone ? "%s: Sequential POSTs (http/1.1) %f/s\n" : "%s: Sequential POSTs (http/1.0) %f/s\n", |
602 | GAUGER ("Multithreaded select", | 602 | "multithreaded post", |
603 | oneone ? "Sequential POSTs (http/1.1)" : "Sequential POSTs (http/1.0)", | 603 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0)); |
604 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0), | 604 | GAUGER ("Multithreaded select", |
605 | "requests/s"); | 605 | oneone ? "Sequential POSTs (http/1.1)" : "Sequential POSTs (http/1.0)", |
606 | start_time = now(); | 606 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0), |
607 | errorCount += testMultithreadedPoolPost (); | 607 | "requests/s"); |
608 | fprintf (stderr, | 608 | start_time = now(); |
609 | oneone ? "%s: Sequential POSTs (http/1.1) %f/s\n" : "%s: Sequential POSTs (http/1.0) %f/s\n", | 609 | errorCount += testMultithreadedPoolPost (); |
610 | "thread with pool", | 610 | fprintf (stderr, |
611 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0)); | 611 | oneone ? "%s: Sequential POSTs (http/1.1) %f/s\n" : "%s: Sequential POSTs (http/1.0) %f/s\n", |
612 | GAUGER ("thread with pool", | 612 | "thread with pool", |
613 | oneone ? "Sequential POSTs (http/1.1)" : "Sequential POSTs (http/1.0)", | 613 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0)); |
614 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0), | 614 | GAUGER ("thread with pool", |
615 | "requests/s"); | 615 | oneone ? "Sequential POSTs (http/1.1)" : "Sequential POSTs (http/1.0)", |
616 | (double) 1000 * LOOPCOUNT / (now() - start_time + 1.0), | ||
617 | "requests/s"); | ||
618 | } | ||
616 | start_time = now(); | 619 | start_time = now(); |
617 | errorCount += testExternalPost (); | 620 | errorCount += testExternalPost (); |
618 | fprintf (stderr, | 621 | fprintf (stderr, |