diff options
Diffstat (limited to 'src/examples/benchmark_https.c')
-rw-r--r-- | src/examples/benchmark_https.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/examples/benchmark_https.c b/src/examples/benchmark_https.c index d3f89eac..f4b5a33a 100644 --- a/src/examples/benchmark_https.c +++ b/src/examples/benchmark_https.c | |||
@@ -25,6 +25,13 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include <microhttpd.h> | 26 | #include <microhttpd.h> |
27 | 27 | ||
28 | #if defined(CPU_COUNT) && (CPU_COUNT+0) < 2 | ||
29 | #undef CPU_COUNT | ||
30 | #endif | ||
31 | #if !defined(CPU_COUNT) | ||
32 | #define CPU_COUNT 2 | ||
33 | #endif | ||
34 | |||
28 | #define PAGE "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" | 35 | #define PAGE "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" |
29 | 36 | ||
30 | 37 | ||
@@ -34,7 +41,7 @@ | |||
34 | * Number of threads to run in the thread pool. Should (roughly) match | 41 | * Number of threads to run in the thread pool. Should (roughly) match |
35 | * the number of cores on your system. | 42 | * the number of cores on your system. |
36 | */ | 43 | */ |
37 | #define NUMBER_OF_THREADS 4 | 44 | #define NUMBER_OF_THREADS CPU_COUNT |
38 | 45 | ||
39 | static unsigned int small_deltas[SMALL]; | 46 | static unsigned int small_deltas[SMALL]; |
40 | 47 | ||