gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r20995 - gnunet/src/ats


From: gnunet
Subject: [GNUnet-SVN] r20995 - gnunet/src/ats
Date: Tue, 17 Apr 2012 16:49:06 +0200

Author: wachs
Date: 2012-04-17 16:49:06 +0200 (Tue, 17 Apr 2012)
New Revision: 20995

Modified:
   gnunet/src/ats/perf_ats_mlp.c
Log:
- latest changes


Modified: gnunet/src/ats/perf_ats_mlp.c
===================================================================
--- gnunet/src/ats/perf_ats_mlp.c       2012-04-17 14:41:50 UTC (rev 20994)
+++ gnunet/src/ats/perf_ats_mlp.c       2012-04-17 14:49:06 UTC (rev 20995)
@@ -111,11 +111,19 @@
                                            int is_persistent)
 {
   static int calls;
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s : %llu\n", name, value);
+  static long long unsigned lp_time;
+  static long long unsigned mlp_time;
+
+  if (0 == strcmp (name, "# LP execution time (ms)"))
+    lp_time = value;
+  if (0 == strcmp (name, "# MLP execution time (ms)"))
+    mlp_time = value;
+
   calls ++;
 
   if (2 == calls)
   {
+    printf ("%u;%u;%llu;%llu\n",peers, addresses, lp_time, mlp_time);
     if (GNUNET_SCHEDULER_NO_TASK != shutdown_task)
       GNUNET_SCHEDULER_cancel(shutdown_task);
     shutdown_task = GNUNET_SCHEDULER_add_now(&do_shutdown, NULL);
@@ -194,7 +202,7 @@
       ca++;
     }
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Problem contains %u peers and %u 
adresses\n", mlp->c_p, mlp->addr_in_problem);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem contains %u peers and %u 
adresses\n", mlp->c_p, mlp->addr_in_problem);
 
   GNUNET_assert (peers == mlp->c_p);
   GNUNET_assert (peers * addresses == mlp->addr_in_problem);
@@ -203,10 +211,8 @@
   if (GNUNET_OK == GAS_mlp_solve_problem(mlp))
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem solved successfully \n");
   else
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Problem solved failed \n");
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Solving problem with %u peers and %u 
addresses failed\n", peers, addresses);
 
-
-
   GAS_mlp_done (mlp);
 
   GNUNET_STATISTICS_get (stats, "ats", "# LP execution time (ms)", 
GNUNET_TIME_UNIT_MINUTES, NULL, &stat_it, NULL);




reply via email to

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