[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35480 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35480 - gnunet/src/rps |
Date: |
Sat, 28 Mar 2015 16:28:50 +0100 |
Author: ch3
Date: 2015-03-28 16:28:50 +0100 (Sat, 28 Mar 2015)
New Revision: 35480
Modified:
gnunet/src/rps/gnunet-service-rps.c
gnunet/src/rps/gnunet-service-rps_sampler.c
Log:
-logging
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-03-28 15:28:45 UTC (rev 35479)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-03-28 15:28:50 UTC (rev 35480)
@@ -1516,8 +1516,6 @@
void **channel_ctx,
const struct GNUNET_MessageHeader *msg)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "PULL REPLY received\n");
-
struct GNUNET_RPS_P2P_PullReplyMessage *in_msg;
struct GNUNET_PeerIdentity *peers;
struct PeerContext *peer_ctx;
@@ -1571,8 +1569,16 @@
/* Do actual logic */
peers = (struct GNUNET_PeerIdentity *) &msg[1];
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "PULL REPLY received, got following peers:\n");
+
for (i = 0 ; i < ntohl (in_msg->num_peers) ; i++)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "%u. %s\n",
+ i,
+ GNUNET_i2s (&peers[i]));
+
#ifdef ENABLE_MALICIOUS
if (1 == mal_type)
{
@@ -2041,6 +2047,13 @@
}
// TODO independent of that also get some peers from CADET_get_peers()?
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Received %u pushes and %u pulls last round (alpha (%.2f) *
gossip_list_size (%u) = %.2f)\n",
+ push_list_size,
+ pull_list_size,
+ alpha,
+ gossip_list_size,
+ alpha * gossip_list_size);
/* Update samplers */
for ( i = 0 ; i < push_list_size ; i++ )
@@ -2370,9 +2383,9 @@
GNUNET_SERVER_add_handlers (server, handlers);
GNUNET_SERVER_disconnect_notify (server,
- &handle_client_disconnect,
- NULL);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Ready to receive requests from clients\n");
+ &handle_client_disconnect,
+ NULL);
+ LOG (GNUNET_ERROR_TYPE_INFO, "Ready to receive requests from clients\n");
do_round_task = GNUNET_SCHEDULER_add_now (&do_round, NULL);
@@ -2408,7 +2421,7 @@
"STARTING SERVICE (rps) for peer [%s]\n",
GNUNET_i2s (&own_identity));
#ifdef ENABLE_MALICIOUS
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Malicious execution compiled in.\n");
#endif /* ENABLE_MALICIOUS */
Modified: gnunet/src/rps/gnunet-service-rps_sampler.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps_sampler.c 2015-03-28 15:28:45 UTC (rev
35479)
+++ gnunet/src/rps/gnunet-service-rps_sampler.c 2015-03-28 15:28:50 UTC (rev
35480)
@@ -314,7 +314,6 @@
s = GNUNET_new (struct RPS_SamplerElement);
RPS_sampler_elem_reinit (s);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "initialised with empty PeerID\n");
return s;
}
@@ -424,16 +423,10 @@
{ /* Growing */
LOG (GNUNET_ERROR_TYPE_DEBUG, "Growing sampler %d -> %d\n", old_size,
new_size);
GNUNET_array_grow (sampler->sampler_elements, sampler->sampler_size,
new_size);
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "sampler->sampler_elements now points to %p\n",
- sampler->sampler_elements);
for ( i = old_size ; i < new_size ; i++ )
{ /* Add new sampler elements */
sampler->sampler_elements[i] = RPS_sampler_elem_create ();
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Added %" PRIX32 ". sampler, now pointing to %p, contains %s\n",
- i, &sampler->sampler_elements[i], GNUNET_i2s
(&sampler->sampler_elements[i]->peer_id));
}
}
else
@@ -443,7 +436,6 @@
}
GNUNET_assert (sampler->sampler_size == new_size);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Finished growing/shrinking.\n"); // remove
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35480 - gnunet/src/rps,
gnunet <=