add statistic to track estimated network diameter
authorChristian Grothoff <christian@grothoff.org>
Thu, 8 Dec 2011 12:42:06 +0000 (12:42 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 8 Dec 2011 12:42:06 +0000 (12:42 +0000)
src/nse/gnunet-service-nse.c

index 1910a3aa7236ec46a7bfdaf88a2df52c0e1facf9..ef9e474c796a949503e02e2c8b5929942736d6fb 100644 (file)
@@ -1123,6 +1123,9 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
       htonl (ntohl (incoming_flood->hop_count) + 1);
   hop_count_max =
       GNUNET_MAX (ntohl (incoming_flood->hop_count) + 1, hop_count_max);
+  GNUNET_STATISTICS_set (stats,
+                        "# estimated network diameter",
+                        hop_count_max, GNUNET_NO);
 
   /* have a new, better size estimate, inform clients */
   update_network_size_estimate ();