rps profiler: more logging
authorJulius Bünger <buenger@mytum.de>
Wed, 11 Apr 2018 08:46:07 +0000 (10:46 +0200)
committerJulius Bünger <buenger@mytum.de>
Wed, 11 Apr 2018 08:46:07 +0000 (10:46 +0200)
src/rps/test_rps.c

index 9905e07abb18336e3ee6cd53cf1eb3f466d25173..60a7431677598ff91b14bce6894af9c2b6a51910 100644 (file)
@@ -2027,6 +2027,19 @@ static void compute_probabilities (uint32_t peer_idx)
                view_size,
                i,
                prob_pull);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "\t\tnumber of possible pull combinations: %" PRIu32 "\n",
+               binom (view_size, 0.45 * view_size));
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "\t\tnumber of possible pull combinations without %" PRIu32
+               ": %" PRIu32 "\n",
+               i,
+               binom (view_size - cont_views, 0.45 * view_size));
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "\t\tnumber of possible pull combinations with %" PRIu32
+               ": %" PRIu32 "\n",
+               i,
+               number_of_being_in_pull_events);
 
     if (0 != probs[i]) count_non_zero_prob++;
   }