gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 04/09: Removed "gauger" server usage from the testsuite


From: gnunet
Subject: [libmicrohttpd] 04/09: Removed "gauger" server usage from the testsuite
Date: Sat, 01 Oct 2022 14:16:04 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 3f98c6092dcdd1e0f59a78d872425e4637896d28
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Sep 30 09:36:07 2022 +0300

    Removed "gauger" server usage from the testsuite
    
    The testsuite should test MHD functionality, not measure performance in
    some unpredictable conditions.
---
 src/testcurl/Makefile.am            |  6 +--
 src/testcurl/gauger.h               | 86 -------------------------------------
 src/testcurl/perf_get.c             |  5 ---
 src/testcurl/perf_get_concurrent.c  |  5 ---
 src/testcurl/test_concurrent_stop.c |  1 -
 src/testcurl/test_post_loop.c       | 21 ---------
 6 files changed, 3 insertions(+), 121 deletions(-)

diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
index cd6dcd21..13f9fed7 100644
--- 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
deleted file mode 100644
index d00839c1..00000000
--- a/src/testcurl/gauger.h
+++ /dev/null
@@ -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
index 3ee1c388..a9298b2a 100644
--- 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
index 80f66eea..f0b4e923 100644
--- 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
index 306b2b5b..e427ea42 100644
--- 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
index f9238faa..dbfd170d 100644
--- 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 ();

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]