aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rps/rps-sampler_client.c41
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)
377 return; 377 return;
378 } 378 }
379 /* compute probability */ 379 /* compute probability */
380 prob_observed_n = prob_observed_n_peers (sampler->num_peers_estim, 380 /* Currently disabled due to numerical limitations */
381 s_elem->num_peers, 381 //prob_observed_n = prob_observed_n_peers (sampler->num_peers_estim,
382 sampler->deficiency_factor); 382 // s_elem->num_peers,
383 /* check if probability is above desired */ 383 // sampler->deficiency_factor);
384 if (prob_observed_n < sampler->desired_probability) 384 //LOG (GNUNET_ERROR_TYPE_DEBUG,
385 { 385 // "Computed sample - prob %f, %" PRIu32 " peers, n: %" PRIu32 ", roh: %f\n",
386 LOG (GNUNET_ERROR_TYPE_DEBUG, 386 // prob_observed_n,
387 "Probability of having observed all peers (%f) too small ( < %f).\n", 387 // s_elem->num_peers,
388 prob_observed_n, 388 // sampler->num_peers_estim,
389 sampler->desired_probability); 389 // sampler->deficiency_factor);
390 GNUNET_assert (NULL == gpc->notify_ctx); 390 ///* check if probability is above desired */
391 gpc->notify_ctx = 391 //if (prob_observed_n < sampler->desired_probability)
392 sampler_notify_on_update (sampler, 392 //{
393 &sampler_mod_get_rand_peer, 393 // LOG (GNUNET_ERROR_TYPE_DEBUG,
394 gpc); 394 // "Probability of having observed all peers (%f) too small ( < %f).\n",
395 return; 395 // prob_observed_n,
396 } 396 // sampler->desired_probability);
397 // GNUNET_assert (NULL == gpc->notify_ctx);
398 // gpc->notify_ctx =
399 // sampler_notify_on_update (sampler,
400 // &sampler_mod_get_rand_peer,
401 // gpc);
402 // return;
403 //}
397 /* More reasons to wait could be added here */ 404 /* More reasons to wait could be added here */
398 405
399// GNUNET_STATISTICS_set (stats, 406// GNUNET_STATISTICS_set (stats,