aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/perf_get_concurrent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/perf_get_concurrent.c')
-rw-r--r--src/testcurl/perf_get_concurrent.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c
index cec87a99..82f240d7 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -41,6 +41,13 @@
41#include <time.h> 41#include <time.h>
42#include "gauger.h" 42#include "gauger.h"
43 43
44#if defined(CPU_COUNT) && (CPU_COUNT+0) < 2
45#undef CPU_COUNT
46#endif
47#if !defined(CPU_COUNT)
48#define CPU_COUNT 2
49#endif
50
44/** 51/**
45 * How many rounds of operations do we do for each 52 * How many rounds of operations do we do for each
46 * test (total number of requests will be ROUNDS * PAR). 53 * test (total number of requests will be ROUNDS * PAR).
@@ -50,7 +57,7 @@
50/** 57/**
51 * How many requests do we do in parallel? 58 * How many requests do we do in parallel?
52 */ 59 */
53#define PAR 4 60#define PAR CPU_COUNT
54 61
55/** 62/**
56 * Do we use HTTP 1.1? 63 * Do we use HTTP 1.1?
@@ -262,7 +269,7 @@ testMultithreadedPoolGet (int port, int poll_flag)
262 269
263 d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag, 270 d = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG | poll_flag,
264 port, NULL, NULL, &ahc_echo, "GET", 271 port, NULL, NULL, &ahc_echo, "GET",
265 MHD_OPTION_THREAD_POOL_SIZE, 4, MHD_OPTION_END); 272 MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END);
266 if (d == NULL) 273 if (d == NULL)
267 return 16; 274 return 16;
268 start_timer (); 275 start_timer ();