gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -fix FTBFS


From: gnunet
Subject: [gnunet] branch master updated: -fix FTBFS
Date: Mon, 06 Dec 2021 23:18:39 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new fa483f6cb -fix FTBFS
fa483f6cb is described below

commit fa483f6cbce4873defe81234f44808bb8042fa68
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Dec 6 23:18:34 2021 +0100

    -fix FTBFS
---
 src/curl/curl.c | 82 ---------------------------------------------------------
 1 file changed, 82 deletions(-)

diff --git a/src/curl/curl.c b/src/curl/curl.c
index 30c2f8c01..684610101 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -858,85 +858,6 @@ GNUNET_CURL_append_header (struct GNUNET_CURL_Context *ctx,
 }
 
 
-#if ENABLE_BENCHMARK
-static void
-do_benchmark (CURLMsg *cmsg)
-{
-  char *url = NULL;
-  double total_as_double = 0;
-  struct GNUNET_TIME_Relative total;
-  struct UrlRequestData *urd;
-  /* Some care required, as curl is using data types (long vs curl_off_t vs
-   * double) inconsistently to store byte count. */
-  curl_off_t size_curl = 0;
-  long size_long = 0;
-  uint64_t bytes_sent = 0;
-  uint64_t bytes_received = 0;
-
-  GNUNET_break (CURLE_OK ==
-                curl_easy_getinfo (cmsg->easy_handle,
-                                   CURLINFO_TOTAL_TIME,
-                                   &total_as_double));
-  total.rel_value_us = total_as_double * 1000 * 1000;
-
-  GNUNET_break (CURLE_OK ==
-                curl_easy_getinfo (cmsg->easy_handle,
-                                   CURLINFO_EFFECTIVE_URL,
-                                   &url));
-
-  /* HEADER_SIZE + SIZE_DOWNLOAD_T is hopefully the total
-     number of bytes received, not clear from curl docs. */
-
-  GNUNET_break (CURLE_OK ==
-                curl_easy_getinfo (cmsg->easy_handle,
-                                   CURLINFO_HEADER_SIZE,
-                                   &size_long));
-  bytes_received += size_long;
-
-  GNUNET_break (CURLE_OK ==
-                curl_easy_getinfo (cmsg->easy_handle,
-                                   CURLINFO_SIZE_DOWNLOAD_T,
-                                   &size_curl));
-  bytes_received += size_curl;
-
-  /* REQUEST_SIZE + SIZE_UPLOAD_T is hopefully the total number of bytes
-     sent, again docs are not completely clear. */
-
-  GNUNET_break (CURLE_OK ==
-                curl_easy_getinfo (cmsg->easy_handle,
-                                   CURLINFO_REQUEST_SIZE,
-                                   &size_long));
-  bytes_sent += size_long;
-
-  /* We obtain this value to check an invariant, but never use it otherwise. */
-  GNUNET_break (CURLE_OK ==
-                curl_easy_getinfo (cmsg->easy_handle,
-                                   CURLINFO_SIZE_UPLOAD_T,
-                                   &size_curl));
-
-  /* CURLINFO_SIZE_UPLOAD_T <= CURLINFO_REQUEST_SIZE should
-     be an invariant.
-     As verified with
-     curl -w "foo%{size_request} -XPOST --data "ABC" $URL
-     the CURLINFO_REQUEST_SIZE should be the whole size of the request
-     including headers and body.
-  */
-  GNUNET_break (size_curl <= size_long);
-
-  urd = get_url_benchmark_data (url, (unsigned int) response_code);
-  urd->count++;
-  urd->time = GNUNET_TIME_relative_add (urd->time,
-                                        total);
-  urd->time_max = GNUNET_TIME_relative_max (total,
-                                            urd->time_max);
-  urd->bytes_sent += bytes_sent;
-  urd->bytes_received += bytes_received;
-}
-
-
-#endif
-
-
 /**
  * Run the main event loop for the HTTP interaction.
  *
@@ -994,9 +915,6 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx,
                 response);
       rc (response);
     }
-#if ENABLE_BENCHMARK
-    do_benchmark (cmsg);
-#endif
     GNUNET_CURL_job_cancel (job);
   }
 }

-- 
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]