gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r32018 - gnunet/src/ats-tests


From: gnunet
Subject: [GNUnet-SVN] r32018 - gnunet/src/ats-tests
Date: Thu, 23 Jan 2014 16:10:08 +0100

Author: wachs
Date: 2014-01-23 16:10:08 +0100 (Thu, 23 Jan 2014)
New Revision: 32018

Modified:
   gnunet/src/ats-tests/perf_ats.c
Log:
fixing test case logging


Modified: gnunet/src/ats-tests/perf_ats.c
===================================================================
--- gnunet/src/ats-tests/perf_ats.c     2014-01-23 14:56:59 UTC (rev 32017)
+++ gnunet/src/ats-tests/perf_ats.c     2014-01-23 15:10:08 UTC (rev 32018)
@@ -117,6 +117,8 @@
  */
 static struct BenchmarkPeer *sps;
 
+static struct LoggingHandle *l;
+
 static void
 evaluate ()
 {
@@ -190,7 +192,7 @@
 {
 
   if (GNUNET_YES == logging)
-    GNUNET_ATS_TEST_logging_stop();
+    GNUNET_ATS_TEST_logging_stop(l);
 
   shutdown_task = GNUNET_SCHEDULER_NO_TASK;
   if (GNUNET_SCHEDULER_NO_TASK != progress_task)
@@ -269,7 +271,7 @@
     }
 
   if (GNUNET_YES == logging)
-    GNUNET_ATS_TEST_logging_start(log_frequency, testname, mps, num_masters);
+    l = GNUNET_ATS_TEST_logging_start(log_frequency, testname, mps, 
num_masters);
 }
 
 static void
@@ -313,7 +315,7 @@
 
 
 static void
-ats_performance_info_cb (void *cls, const struct GNUNET_HELLO_Address *address,
+log_request_cb (void *cls, const struct GNUNET_HELLO_Address *address,
     int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
     struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
     const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
@@ -321,7 +323,6 @@
   struct BenchmarkPeer *me = cls;
   struct BenchmarkPartner *p;
   int c_a;
-  int log;
   char *peer_id;
 
   p = find_partner (me, &address->peer);
@@ -334,10 +335,8 @@
   }
   peer_id = GNUNET_strdup (GNUNET_i2s (&me->id));
 
-  log = GNUNET_NO;
   if ((p->bandwidth_in != ntohl (bandwidth_in.value__)) ||
       (p->bandwidth_out != ntohl (bandwidth_out.value__)))
-      log = GNUNET_YES;
   p->bandwidth_in = ntohl (bandwidth_in.value__);
   p->bandwidth_out = ntohl (bandwidth_out.value__);
 
@@ -351,7 +350,8 @@
         ntohl(ats[c_a].value));
   }
   GNUNET_free(peer_id);
-
+  if (NULL != l)
+    GNUNET_ATS_TEST_logging_now (l);
 }
 
 
@@ -544,7 +544,7 @@
       &do_benchmark,
       NULL,
       &test_recv_cb,
-      &ats_performance_info_cb);
+      &log_request_cb);
 
   return result;
 }




reply via email to

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