[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: rps profiler: logging
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: rps profiler: logging |
Date: |
Wed, 11 Apr 2018 10:27:14 +0200 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 9e0e804cd rps profiler: logging
9e0e804cd is described below
commit 9e0e804cdf11b342a067516ac8d5527c2a774284
Author: Julius Bünger <address@hidden>
AuthorDate: Wed Apr 11 10:25:42 2018 +0200
rps profiler: logging
---
src/rps/test_rps.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index 03524eaeb..9905e07ab 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -1917,6 +1917,9 @@ static uint32_t get_idx_of_pid (const struct
GNUNET_PeerIdentity *pid)
}
}
//return 0; /* Should not happen - make compiler happy */
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "No known _PeerIdentity %s!\n",
+ GNUNET_i2s_full (pid));
GNUNET_assert (0);
}
@@ -1967,10 +1970,16 @@ static void compute_probabilities (uint32_t peer_idx)
int tmp;
uint32_t count_non_zero_prob = 0;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Computing probabilities for peer %" PRIu32 "\n", peer_idx);
/* Firstly without knowledge of old views */
for (i = 0; i < num_peers; i++)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "\tfor peer %" PRIu32 ":\n", i);
view_size = rps_peers[i].cur_view_count;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "\t\tview_size: %" PRIu32 "\n", view_size);
/* For peer i the probability of being sampled is
* evenly distributed among all possibly observed peers. */
/* We could have observed a peer in three cases:
@@ -2010,6 +2019,14 @@ static void compute_probabilities (uint32_t peer_idx)
prob_pull = 0;
}
probs[i] = prob_push + prob_pull - (prob_push * prob_pull);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "\t\t%" PRIu32 " has %" PRIu32 " of %" PRIu32
+ " peers in its view who know %" PRIu32 " prob: %f\n",
+ peer_idx,
+ cont_views,
+ view_size,
+ i,
+ prob_pull);
if (0 != probs[i]) count_non_zero_prob++;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: rps profiler: logging,
gnunet <=