commit 3f98c6092dcdd1e0f59a78d872425e4637896d28
parent 4adc14c948ac4981a7b4c91c6e16dc5fc39dd97a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Fri, 30 Sep 2022 09:36:07 +0300
Removed "gauger" server usage from the testsuite
The testsuite should test MHD functionality, not measure performance in
some unpredictable conditions.
Diffstat:
6 files changed, 3 insertions(+), 121 deletions(-)
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
@@ -259,11 +259,11 @@ test_callback_SOURCES = \
perf_get_SOURCES = \
perf_get.c \
- gauger.h mhd_has_in_name.h
+ mhd_has_in_name.h
perf_get_concurrent_SOURCES = \
perf_get_concurrent.c \
- gauger.h mhd_has_in_name.h
+ mhd_has_in_name.h
perf_get_concurrent_CFLAGS = \
$(AM_CFLAGS) $(PTHREAD_CFLAGS)
perf_get_concurrent_LDADD = \
@@ -271,7 +271,7 @@ perf_get_concurrent_LDADD = \
perf_get_concurrent11_SOURCES = \
perf_get_concurrent.c \
- gauger.h mhd_has_in_name.h
+ mhd_has_in_name.h
perf_get_concurrent11_CFLAGS = \
$(AM_CFLAGS) $(PTHREAD_CFLAGS)
perf_get_concurrent11_LDADD = \
diff --git a/src/testcurl/gauger.h b/src/testcurl/gauger.h
@@ -1,86 +0,0 @@
-/** ---------------------------------------------------------------------------
- * This software is in the public domain, furnished "as is", without technical
- * support, and with no warranty, express or implied, as to its usefulness for
- * any purpose.
- *
- * gauger.h
- * Interface for C programs to log remotely to a gauger server
- *
- * Author: Bartlomiej Polot
- * -------------------------------------------------------------------------*/
-#ifndef __GAUGER_H__
-#define __GAUGER_H__
-
-#ifndef WINDOWS
-
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/wait.h>
-
-#define GAUGER(category, counter, value, unit) \
- { \
- const char *__gauger_v[10]; \
- char __gauger_s[32]; \
- pid_t __gauger_p; \
- if (! (__gauger_p = fork ())) { \
- if (! fork ()) { \
- sprintf (__gauger_s,"%Lf", (long double) (value)); \
- __gauger_v[0] = "gauger"; \
- __gauger_v[1] = "-n"; \
- __gauger_v[2] = counter; \
- __gauger_v[3] = "-d"; \
- __gauger_v[4] = __gauger_s; \
- __gauger_v[5] = "-u"; \
- __gauger_v[6] = unit; \
- __gauger_v[7] = "-c"; \
- __gauger_v[8] = category; \
- __gauger_v[9] = (char *) NULL; \
- execvp ("gauger", (char*const*) __gauger_v); \
- _exit (1); \
- }else{ \
- _exit (0); \
- } \
- }else{ \
- waitpid (__gauger_p,NULL,0); \
- } \
- }
-
-#define GAUGER_ID(category, counter, value, unit, id) \
- { \
- char*__gauger_v[12]; \
- char __gauger_s[32]; \
- pid_t __gauger_p; \
- if (! (__gauger_p = fork ())) { \
- if (! fork ()) { \
- sprintf (__gauger_s,"%Lf", (long double) (value)); \
- __gauger_v[0] = "gauger"; \
- __gauger_v[1] = "-n"; \
- __gauger_v[2] = counter; \
- __gauger_v[3] = "-d"; \
- __gauger_v[4] = __gauger_s; \
- __gauger_v[5] = "-u"; \
- __gauger_v[6] = unit; \
- __gauger_v[7] = "-i"; \
- __gauger_v[8] = id; \
- __gauger_v[9] = "-c"; \
- __gauger_v[10] = category; \
- __gauger_v[11] = (char *) NULL; \
- execvp ("gauger",__gauger_v); \
- perror ("gauger"); \
- _exit (1); \
- }else{ \
- _exit (0); \
- } \
- }else{ \
- waitpid (__gauger_p,NULL,0); \
- } \
- }
-
-#else
-
-#define GAUGER_ID(category, counter, value, unit, id) {}
-#define GAUGER(category, counter, value, unit) {}
-
-#endif /* WINDOWS */
-
-#endif
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c
@@ -45,7 +45,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include "gauger.h"
#include "mhd_has_in_name.h"
#ifndef WINDOWS
@@ -131,10 +130,6 @@ stop (const char *desc)
desc,
rps,
"requests/s");
- GAUGER (desc,
- "Sequential GETs",
- rps,
- "requests/s");
}
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c
@@ -42,7 +42,6 @@
#include <string.h>
#include <time.h>
#include <pthread.h>
-#include "gauger.h"
#include "mhd_has_in_name.h"
#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
@@ -135,10 +134,6 @@ stop (const char *desc)
desc,
rps,
"requests/s");
- GAUGER (desc,
- "Parallel GETs",
- rps,
- "requests/s");
}
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c
@@ -33,7 +33,6 @@
#include <string.h>
#include <time.h>
#include <pthread.h>
-#include "gauger.h"
#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
#undef MHD_CPU_COUNT
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c
@@ -33,7 +33,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include "gauger.h"
#include "mhd_has_in_name.h"
#ifndef WINDOWS
@@ -642,11 +641,6 @@ main (int argc, char *const *argv)
"%s: Sequential POSTs (http/1.0) %f/s\n",
"internal select",
(double) 1000 * LOOPCOUNT / (now () - start_time + 1.0));
- GAUGER ("internal select",
- oneone ? "Sequential POSTs (http/1.1)" :
- "Sequential POSTs (http/1.0)",
- (double) 1000 * LOOPCOUNT / (now () - start_time + 1.0),
- "requests/s");
start_time = now ();
errorCount += testMultithreadedPost ();
fprintf (stderr,
@@ -654,11 +648,6 @@ main (int argc, char *const *argv)
"%s: Sequential POSTs (http/1.0) %f/s\n",
"multithreaded post",
(double) 1000 * LOOPCOUNT / (now () - start_time + 1.0));
- GAUGER ("Multithreaded select",
- oneone ? "Sequential POSTs (http/1.1)" :
- "Sequential POSTs (http/1.0)",
- (double) 1000 * LOOPCOUNT / (now () - start_time + 1.0),
- "requests/s");
start_time = now ();
errorCount += testMultithreadedPoolPost ();
fprintf (stderr,
@@ -666,11 +655,6 @@ main (int argc, char *const *argv)
"%s: Sequential POSTs (http/1.0) %f/s\n",
"thread with pool",
(double) 1000 * LOOPCOUNT / (now () - start_time + 1.0));
- GAUGER ("thread with pool",
- oneone ? "Sequential POSTs (http/1.1)" :
- "Sequential POSTs (http/1.0)",
- (double) 1000 * LOOPCOUNT / (now () - start_time + 1.0),
- "requests/s");
}
start_time = now ();
errorCount += testExternalPost ();
@@ -679,11 +663,6 @@ main (int argc, char *const *argv)
"%s: Sequential POSTs (http/1.0) %f/s\n",
"external select",
(double) 1000 * LOOPCOUNT / (now () - start_time + 1.0));
- GAUGER ("external select",
- oneone ? "Sequential POSTs (http/1.1)" :
- "Sequential POSTs (http/1.0)",
- (double) 1000 * LOOPCOUNT / (now () - start_time + 1.0),
- "requests/s");
if (errorCount != 0)
fprintf (stderr, "Error (code: %u)\n", errorCount);
curl_global_cleanup ();