gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: Log number of know peers to


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: Log number of know peers to statistics service
Date: Tue, 18 Sep 2018 17:28:03 +0200

This is an automated email from the git hooks/post-receive script.

julius-buenger pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new ac741e1dd Log number of know peers to statistics service
ac741e1dd is described below

commit ac741e1dd9ee1d8abe58a80688ad3765cdc866e8
Author: Julius Bünger <address@hidden>
AuthorDate: Tue Sep 18 17:27:35 2018 +0200

    Log number of know peers to statistics service
---
 src/rps/gnunet-service-rps.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 4da73b09c..ec6c651d9 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -368,6 +368,10 @@ create_peer_ctx (const struct GNUNET_PeerIdentity *peer)
   ret = GNUNET_CONTAINER_multipeermap_put (peer_map, peer, ctx,
       GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
   GNUNET_assert (GNUNET_OK == ret);
+  GNUNET_STATISTICS_set (stats,
+                        "# known peers",
+                        GNUNET_CONTAINER_multipeermap_size (peer_map),
+                        GNUNET_NO);
   return ctx;
 }
 
@@ -1022,6 +1026,10 @@ destroy_peer (struct PeerContext *peer_ctx)
     LOG (GNUNET_ERROR_TYPE_WARNING,
          "removing peer from peer_map failed\n");
   }
+  GNUNET_STATISTICS_set (stats,
+                        "# known peers",
+                        GNUNET_CONTAINER_multipeermap_size (peer_map),
+                        GNUNET_NO);
   GNUNET_free (peer_ctx);
   return GNUNET_YES;
 }
@@ -2477,6 +2485,10 @@ add_peer_array_to_set (const struct GNUNET_PeerIdentity 
*peer_array,
                                        &peer_array[i],
                                        NULL,
                                        
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
+    GNUNET_STATISTICS_set (stats,
+                          "# known peers",
+                          GNUNET_CONTAINER_multipeermap_size (peer_map),
+                          GNUNET_NO);
   }
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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