gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: RPS: Track delta expected -


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: RPS: Track delta expected - received pushes w. statistics, style
Date: Tue, 26 Feb 2019 13:42:27 +0100

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 4b90044d7 RPS: Track delta expected - received pushes w. statistics, 
style
4b90044d7 is described below

commit 4b90044d7f5716e7b299b53b37491712d43c815e
Author: Julius Bünger <address@hidden>
AuthorDate: Tue Feb 26 13:40:54 2019 +0100

    RPS: Track delta expected - received pushes w. statistics, style
---
 src/rps/gnunet-service-rps.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 63b530e85..4758478c1 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2709,8 +2709,8 @@ remove_peer (struct Sub *sub,
   if (GNUNET_YES == check_peer_known (sub->peer_map,
                                       peer))
   {
-          destroy_peer (get_peer_ctx (sub->peer_map,
-                                      peer));
+    destroy_peer (get_peer_ctx (sub->peer_map,
+                                peer));
   }
 }
 
@@ -3811,7 +3811,8 @@ send_pull_request (struct PeerContext *peer_ctx)
   GNUNET_assert (GNUNET_NO == check_peer_flag (peer_ctx->sub->peer_map,
                                                &peer_ctx->peer_id,
                                                Peers_PULL_REPLY_PENDING));
-  SET_PEER_FLAG (peer_ctx, Peers_PULL_REPLY_PENDING);
+  SET_PEER_FLAG (peer_ctx,
+                 Peers_PULL_REPLY_PENDING);
   peer_ctx->round_pull_req = peer_ctx->sub->num_rounds;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -3819,7 +3820,9 @@ send_pull_request (struct PeerContext *peer_ctx)
        GNUNET_i2s (&peer_ctx->peer_id));
 
   ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST);
-  send_message (peer_ctx, ev, "PULL REQUEST");
+  send_message (peer_ctx,
+                ev,
+                "PULL REQUEST");
   if (peer_ctx->sub)
   {
     GNUNET_STATISTICS_update (stats,
@@ -4386,7 +4389,7 @@ do_round (void *cls)
   }
   // FIXME check bounds of histogram
   sub->push_delta[(CustomPeerMap_size (sub->push_map) -
-                   sub->view_size_est_need) +
+                   (alpha * sub->view_size_est_need)) +
                           (HISTOGRAM_FILE_SLOTS/2)]++;
   if (sub == msub)
   {
@@ -4406,6 +4409,10 @@ do_round (void *cls)
         "# expected pushes",
         alpha * sub->view_size_est_need,
         GNUNET_NO);
+    GNUNET_STATISTICS_set (stats,
+        "delta expected - received pushes",
+        CustomPeerMap_size (sub->push_map) - (alpha * sub->view_size_est_need),
+        GNUNET_NO);
   }
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,

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



reply via email to

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