check
[oweals/gnunet.git] / src / core / test_core_api_reliability.c
index 7eab92b126521cb19f7950f0866b797b9d21628a..f21691691103322a461918dab0e020725e2db67f 100644 (file)
@@ -34,6 +34,7 @@
 #include "gnunet_program_lib.h"
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_transport_service.h"
+#include <gauger.h>
 
 #define VERBOSE GNUNET_NO
 
@@ -131,6 +132,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   fprintf (stderr,
           "\nThroughput was %llu kb/s\n",
           total_bytes * 1000 / 1024 / delta);
+  GAUGER ("CORE", "Core throughput/s", total_bytes * 1000 / 1024 / delta, "kb/s");
   ok = 0;
 }
 
@@ -165,6 +167,7 @@ transmit_ready (void *cls, size_t size, void *buf)
       if (p1.ch != NULL)
        GNUNET_break (NULL != 
                      GNUNET_CORE_notify_transmit_ready (p1.ch,
+                                                        GNUNET_NO,
                                                         0,
                                                         FAST_TIMEOUT,
                                                         &p2.id,
@@ -242,6 +245,7 @@ connect_notify (void *cls,
       start_time = GNUNET_TIME_absolute_get ();
       GNUNET_break (NULL != 
                    GNUNET_CORE_notify_transmit_ready (p1.ch,
+                                                      GNUNET_NO,
                                                       0,
                                                       TIMEOUT,
                                                       &p2.id,
@@ -354,6 +358,7 @@ process_mtype (void *cls,
       if (n == tr_n)
        GNUNET_break (NULL != 
                      GNUNET_CORE_notify_transmit_ready (p1.ch,
+                                                        GNUNET_NO,
                                                         0,
                                                         FAST_TIMEOUT,
                                                         &p2.id,
@@ -430,14 +435,14 @@ process_hello (void *cls,
   p->hello = GNUNET_malloc (ntohs (message->size));
   memcpy (p->hello, message, ntohs (message->size));
   if ((p == &p1) && (p2.th != NULL))
-    GNUNET_TRANSPORT_offer_hello (p2.th, message);
+    GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL);
   if ((p == &p2) && (p1.th != NULL))
-    GNUNET_TRANSPORT_offer_hello (p1.th, message);
+    GNUNET_TRANSPORT_offer_hello (p1.th, message, NULL, NULL);
 
   if ((p == &p1) && (p2.hello != NULL))
-    GNUNET_TRANSPORT_offer_hello (p1.th, p2.hello);
+    GNUNET_TRANSPORT_offer_hello (p1.th, p2.hello, NULL, NULL);
   if ((p == &p2) && (p1.hello != NULL))
-    GNUNET_TRANSPORT_offer_hello (p2.th, p1.hello);
+    GNUNET_TRANSPORT_offer_hello (p2.th, p1.hello, NULL, NULL);
 }