rps profiler: fix probability computation
authorJulius Bünger <buenger@mytum.de>
Mon, 9 Apr 2018 19:14:52 +0000 (21:14 +0200)
committerJulius Bünger <buenger@mytum.de>
Mon, 9 Apr 2018 19:14:52 +0000 (21:14 +0200)
src/rps/test_rps.c

index 086b0782e2e134de3efc559810a614975abb9529..03524eaebe44825e1f2e90d6dd636b8fdcbe1499 100644 (file)
@@ -1998,7 +1998,7 @@ static void compute_probabilities (uint32_t peer_idx)
     }
     /* 2. Probability of peer i being contained in pulls */
     view_size = rps_peers[peer_idx].cur_view_count;
-    cont_views = count_containing_views (i, peer_idx);
+    cont_views = count_containing_views (peer_idx, i);
     number_of_being_in_pull_events =
       (binom (view_size, 0.45 * view_size) -
        binom (view_size - cont_views, 0.45 * view_size));