gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 02/02: RPS sampler: Disable computation of probabi


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 02/02: RPS sampler: Disable computation of probability
Date: Wed, 10 Apr 2019 14:11:06 +0200

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

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

commit be52c40584d5b1ad7e8f3a99d80ab0add4387d04
Author: Julius Bünger <address@hidden>
AuthorDate: Wed Apr 10 14:10:23 2019 +0200

    RPS sampler: Disable computation of probability
---
 src/rps/rps-sampler_client.c | 41 ++++++++++++++++++++++++-----------------
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/src/rps/rps-sampler_client.c b/src/rps/rps-sampler_client.c
index 20cd9d0c4..64ae2dedd 100644
--- a/src/rps/rps-sampler_client.c
+++ b/src/rps/rps-sampler_client.c
@@ -377,23 +377,30 @@ sampler_mod_get_rand_peer (void *cls)
     return;
   }
   /* compute probability */
-  prob_observed_n = prob_observed_n_peers (sampler->num_peers_estim,
-                                           s_elem->num_peers,
-                                           sampler->deficiency_factor);
-  /* check if probability is above desired */
-  if (prob_observed_n < sampler->desired_probability)
-  {
-    LOG (GNUNET_ERROR_TYPE_DEBUG,
-        "Probability of having observed all peers (%f) too small ( < %f).\n",
-        prob_observed_n,
-        sampler->desired_probability);
-    GNUNET_assert (NULL == gpc->notify_ctx);
-    gpc->notify_ctx =
-      sampler_notify_on_update (sampler,
-                                &sampler_mod_get_rand_peer,
-                                gpc);
-    return;
-  }
+  /* Currently disabled due to numerical limitations */
+  //prob_observed_n = prob_observed_n_peers (sampler->num_peers_estim,
+  //                                         s_elem->num_peers,
+  //                                         sampler->deficiency_factor);
+  //LOG (GNUNET_ERROR_TYPE_DEBUG,
+  //    "Computed sample - prob %f, %" PRIu32 " peers, n: %" PRIu32 ", roh: 
%f\n",
+  //    prob_observed_n,
+  //    s_elem->num_peers,
+  //    sampler->num_peers_estim,
+  //    sampler->deficiency_factor);
+  ///* check if probability is above desired */
+  //if (prob_observed_n < sampler->desired_probability)
+  //{
+  //  LOG (GNUNET_ERROR_TYPE_DEBUG,
+  //      "Probability of having observed all peers (%f) too small ( < %f).\n",
+  //      prob_observed_n,
+  //      sampler->desired_probability);
+  //  GNUNET_assert (NULL == gpc->notify_ctx);
+  //  gpc->notify_ctx =
+  //    sampler_notify_on_update (sampler,
+  //                              &sampler_mod_get_rand_peer,
+  //                              gpc);
+  //  return;
+  //}
   /* More reasons to wait could be added here */
 
 //  GNUNET_STATISTICS_set (stats,

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



reply via email to

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