aboutsummaryrefslogtreecommitdiff
path: root/src/rps/test_rps.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-16 20:04:12 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-16 20:04:12 +0100
commitd9b47275349c8686f3e75c4c04c0e717894f1cb8 (patch)
treec3534a5bc73d509b19f355813efeef94d0979d93 /src/rps/test_rps.c
parent77a7b96bd7cc0fac5a9d59775ee09e2162239399 (diff)
parent41000a00c7a97ef25b8677ef31b66286465c2269 (diff)
downloadgnunet-d9b47275349c8686f3e75c4c04c0e717894f1cb8.tar.gz
gnunet-d9b47275349c8686f3e75c4c04c0e717894f1cb8.zip
Merge branch 'master' of git+ssh://gnunet.org/gnunet
Diffstat (limited to 'src/rps/test_rps.c')
-rw-r--r--src/rps/test_rps.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index a7dc3aa00..de09b423f 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -180,7 +180,7 @@ struct RPSPeer
180 /** 180 /**
181 * Index of the peer. 181 * Index of the peer.
182 */ 182 */
183 unsigned int index; 183 uint32_t index;
184 184
185 /** 185 /**
186 * Handle for RPS connect operation. 186 * Handle for RPS connect operation.
@@ -2380,10 +2380,10 @@ view_update_cb (void *cls,
2380 "View was updated (%" PRIu64 ")\n", view_size); 2380 "View was updated (%" PRIu64 ")\n", view_size);
2381 struct RPSPeer *rps_peer = (struct RPSPeer *) cls; 2381 struct RPSPeer *rps_peer = (struct RPSPeer *) cls;
2382 to_file ("/tmp/rps/view_sizes.txt", 2382 to_file ("/tmp/rps/view_sizes.txt",
2383 "%" PRIu64 " %" PRIu32 "", 2383 "%" PRIu32 " %" PRIu64 "",
2384 rps_peer->index, 2384 rps_peer->index,
2385 view_size); 2385 view_size);
2386 for (int i = 0; i < view_size; i++) 2386 for (uint64_t i = 0; i < view_size; i++)
2387 { 2387 {
2388 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2388 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2389 "\t%s\n", GNUNET_i2s (&peers[i])); 2389 "\t%s\n", GNUNET_i2s (&peers[i]));
@@ -2396,14 +2396,14 @@ view_update_cb (void *cls,
2396 peers, 2396 peers,
2397 view_size * sizeof(struct GNUNET_PeerIdentity)); 2397 view_size * sizeof(struct GNUNET_PeerIdentity));
2398 to_file ("/tmp/rps/count_in_views.txt", 2398 to_file ("/tmp/rps/count_in_views.txt",
2399 "%" PRIu64 " %" PRIu32 "", 2399 "%" PRIu32 " %" PRIu32 "",
2400 rps_peer->index, 2400 rps_peer->index,
2401 count_peer_in_views_2 (rps_peer->index)); 2401 count_peer_in_views_2 (rps_peer->index));
2402 cumulated_view_sizes (); 2402 cumulated_view_sizes ();
2403 if (0 != view_size) 2403 if (0 != view_size)
2404 { 2404 {
2405 to_file ("/tmp/rps/repr.txt", 2405 to_file ("/tmp/rps/repr.txt",
2406 "%" PRIu64 /* index */ 2406 "%" PRIu32 /* index */
2407 " %" PRIu32 /* occurrence in views */ 2407 " %" PRIu32 /* occurrence in views */
2408 " %" PRIu32 /* view sizes */ 2408 " %" PRIu32 /* view sizes */
2409 " %f" /* fraction of repr in views */ 2409 " %f" /* fraction of repr in views */
@@ -2428,7 +2428,7 @@ static void
2428pre_profiler (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h) 2428pre_profiler (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
2429{ 2429{
2430 rps_peer->file_name_probs = 2430 rps_peer->file_name_probs =
2431 store_prefix_file_name (rps_peer->peer_id, "probs"); 2431 store_prefix_file_name (rps_peer->index, "probs");
2432 GNUNET_RPS_view_request (h, 0, view_update_cb, rps_peer); 2432 GNUNET_RPS_view_request (h, 0, view_update_cb, rps_peer);
2433} 2433}
2434 2434