diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-26 16:45:03 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-26 16:45:03 +0300 |
commit | 49edf6b94d0aa8588a0ac31801a597c99d405c44 (patch) | |
tree | 690efea638f08b84f42783842203220abc85d173 | |
parent | 55e624e7d0c25804d242d453cb043779cf67fede (diff) | |
download | libmicrohttpd-49edf6b94d0aa8588a0ac31801a597c99d405c44.tar.gz libmicrohttpd-49edf6b94d0aa8588a0ac31801a597c99d405c44.zip |
perf_get_concurrent: fixed exhausting of local ports on multi-core machines
-rw-r--r-- | src/testcurl/perf_get_concurrent.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c index e1c2e997..2c685867 100644 --- a/src/testcurl/perf_get_concurrent.c +++ b/src/testcurl/perf_get_concurrent.c | |||
@@ -52,8 +52,13 @@ | |||
52 | /** | 52 | /** |
53 | * How many rounds of operations do we do for each | 53 | * How many rounds of operations do we do for each |
54 | * test (total number of requests will be ROUNDS * PAR). | 54 | * test (total number of requests will be ROUNDS * PAR). |
55 | * Ensure that free ports are not exhausted during test. | ||
55 | */ | 56 | */ |
57 | #if CPU_COUNT > 8 | ||
58 | #define ROUNDS (1 + (30000 / 12) / CPU_COUNT) | ||
59 | #else | ||
56 | #define ROUNDS 500 | 60 | #define ROUNDS 500 |
61 | #endif | ||
57 | 62 | ||
58 | /** | 63 | /** |
59 | * How many requests do we do in parallel? | 64 | * How many requests do we do in parallel? |