gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r26614 - gnunet/src/nse


From: gnunet
Subject: [GNUnet-SVN] r26614 - gnunet/src/nse
Date: Tue, 26 Mar 2013 18:18:21 +0100

Author: harsha
Date: 2013-03-26 18:18:21 +0100 (Tue, 26 Mar 2013)
New Revision: 26614

Modified:
   gnunet/src/nse/gnunet-nse-profiler.c
Log:
- request nse statistics only

Modified: gnunet/src/nse/gnunet-nse-profiler.c
===================================================================
--- gnunet/src/nse/gnunet-nse-profiler.c        2013-03-26 16:39:54 UTC (rev 
26613)
+++ gnunet/src/nse/gnunet-nse-profiler.c        2013-03-26 17:18:21 UTC (rev 
26614)
@@ -537,37 +537,10 @@
 {
   struct StatsContext *stats_context = cls;
   char buf[512];
-  const char *const sections[] = {"core", "transport", "nse"};
   size_t buf_len;
-  unsigned int cnt;
-  unsigned int nsections;
 
-  nsections = sizeof (sections) / sizeof (char *);
-  for (cnt = 0; cnt < nsections; cnt++)
-    if (0 == strcmp (subsystem, sections[cnt]))
-      break;
-  if (cnt == nsections)
-    return GNUNET_OK;
-
-  if (NULL == data_file)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                "%p -> %s [%s]: %llu\n",
-                peer, subsystem, name, value);
-  }
-  else
-  {
-    buf_len =
-        GNUNET_snprintf (buf,
-                         sizeof (buf),
-                         "%p [%s] %s %llu\n",
-                         peer,
-                         subsystem, name, value);
-    if (buf_len != GNUNET_DISK_file_write (data_file, buf, buf_len))
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unable to write to file!\n");
-  }
-  if (0 != strcmp (subsystem, "nse"))
-    return GNUNET_OK;
+  if (0 != strcasecmp (subsystem, "nse"))
+    return GNUNET_SYSERR;
   if (0 == strcmp (name, "# flood messages received"))
   {
     stats_context->total_nse_received_messages += value;
@@ -635,7 +608,7 @@
   get_stats_op =
       GNUNET_TESTBED_get_statistics (num_peers_in_round[current_round],
                                      daemons,
-                                     NULL, NULL,
+                                     "nse", NULL,
                                      &statistics_iterator,
                                      &stats_finished_callback,
                                      stats_context);




reply via email to

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