gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24484 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r24484 - gnunet/src/fs
Date: Tue, 23 Oct 2012 17:00:15 +0200

Author: grothoff
Date: 2012-10-23 17:00:15 +0200 (Tue, 23 Oct 2012)
New Revision: 24484

Modified:
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/gnunet-service-fs_cp.c
   gnunet/src/fs/gnunet-service-fs_pe.c
   gnunet/src/fs/gnunet-service-fs_pr.c
   gnunet/src/fs/perf_gnunet_service_fs_p2p.c
Log:
-do even fewer stats by default

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2012-10-23 14:46:59 UTC (rev 24483)
+++ gnunet/src/fs/gnunet-service-fs.c   2012-10-23 15:00:15 UTC (rev 24484)
@@ -63,7 +63,12 @@
  */
 #define COVER_AGE_FREQUENCY GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 5)
 
+/**
+ * Collect an instane number of statistics?  May cause excessive IPC.
+ */
+#define INSANE_STATISTICS GNUNET_NO
 
+
 /* ****************************** globals ****************************** */
 
 /**
@@ -296,9 +301,11 @@
 
   if (GNUNET_YES != GSF_pending_request_test_target_ (pr, peer))
   {
+#if INSANE_STATISTICS
     GNUNET_STATISTICS_update (GSF_stats,
                               gettext_noop ("# Loopback routes suppressed"), 1,
                               GNUNET_NO);
+#endif
     return;
   }
   GSF_plan_add_ (cp, pr);

Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c        2012-10-23 14:46:59 UTC (rev 
24483)
+++ gnunet/src/fs/gnunet-service-fs_cp.c        2012-10-23 15:00:15 UTC (rev 
24484)
@@ -50,7 +50,12 @@
  */
 #define REPLY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 
2)
 
+/**
+ * Collect an instane number of statistics?  May cause excessive IPC.
+ */
+#define INSANE_STATISTICS GNUNET_NO
 
+
 /**
  * Handle to cancel a transmission request.
  */
@@ -864,11 +869,12 @@
                                      GNUNET_CRYPTO_random_u32
                                      (GNUNET_CRYPTO_QUALITY_WEAK,
                                       2 * GSF_avg_latency.rel_value + 1));
+#if INSANE_STATISTICS
   GNUNET_STATISTICS_update (GSF_stats,
                             gettext_noop
                             ("# artificial delays introduced (ms)"),
                             ret.rel_value, GNUNET_NO);
-
+#endif
   return ret;
 }
 
@@ -1044,10 +1050,12 @@
   ld = GSF_test_get_load_too_high_ (0);
   if (GNUNET_SYSERR == ld)
   {
+#if INSANE_STATISTICS
     GNUNET_STATISTICS_update (GSF_stats,
                               gettext_noop
                               ("# requests done for free (low load)"), 1,
                               GNUNET_NO);
+#endif
     return 0;                   /* excess resources */
   }
   if (prio_in > INT32_MAX)
@@ -1213,10 +1221,12 @@
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Failed to find peer `%4s' in connection set. Dropping 
query.\n",
                   GNUNET_i2s (other));
+#if INSANE_STATISTICS
     GNUNET_STATISTICS_update (GSF_stats,
                               gettext_noop
                               ("# requests dropped due to missing reverse 
route"),
                               1, GNUNET_NO);
+#endif
     return NULL;
   }
   /* note that we can really only check load here since otherwise

Modified: gnunet/src/fs/gnunet-service-fs_pe.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.c        2012-10-23 14:46:59 UTC (rev 
24483)
+++ gnunet/src/fs/gnunet-service-fs_pe.c        2012-10-23 15:00:15 UTC (rev 
24484)
@@ -483,8 +483,10 @@
         GNUNET_SCHEDULER_add_delayed (delay, &schedule_peer_transmission, pp);
     return;
   }
+#if INSANE_STATISTICS
   GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# query plans executed"),
                             1, GNUNET_NO);
+#endif
   /* process from priority heap */
   rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing query plan %p\n", rp);

Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c        2012-10-23 14:46:59 UTC (rev 
24483)
+++ gnunet/src/fs/gnunet-service-fs_pr.c        2012-10-23 15:00:15 UTC (rev 
24484)
@@ -826,10 +826,12 @@
             last_transmission, prq->type, prq->data, prq->size);
     return GNUNET_YES;
   case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE:
+#if INSANE_STATISTICS
     GNUNET_STATISTICS_update (GSF_stats,
                               gettext_noop
                               ("# duplicate replies discarded (bloomfilter)"),
                               1, GNUNET_NO);
+#endif
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Duplicate response, discarding.\n");
     return GNUNET_YES;          /* duplicate */

Modified: gnunet/src/fs/perf_gnunet_service_fs_p2p.c
===================================================================
--- gnunet/src/fs/perf_gnunet_service_fs_p2p.c  2012-10-23 14:46:59 UTC (rev 
24483)
+++ gnunet/src/fs/perf_gnunet_service_fs_p2p.c  2012-10-23 15:00:15 UTC (rev 
24484)
@@ -73,7 +73,6 @@
  * Statistics we print out.
  */
 static struct StatValues stats[] = {
-  {"fs", "# artificial delays introduced (ms)"},
   {"fs", "# queries forwarded"},
   {"fs", "# replies received and matched"},
   {"fs", "# results found locally"},




reply via email to

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