diff options
author | Julius Bünger <buenger@mytum.de> | 2019-04-10 14:10:23 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2019-04-10 14:10:23 +0200 |
commit | be52c40584d5b1ad7e8f3a99d80ab0add4387d04 (patch) | |
tree | 10e88e3ec1ad3e0b8c89ccab1bef5af715bd08f1 | |
parent | 20714e46c74f47d0ecc2359cbb4aa944ecc78135 (diff) |
RPS sampler: Disable computation of probability
-rw-r--r-- | src/rps/rps-sampler_client.c | 41 |
1 files 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, |