[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10606 - in gnunet: contrib src/statistics src/topology src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10606 - in gnunet: contrib src/statistics src/topology src/transport |
Date: |
Tue, 16 Mar 2010 09:32:22 +0100 |
Author: grothoff
Date: 2010-03-16 09:32:22 +0100 (Tue, 16 Mar 2010)
New Revision: 10606
Modified:
gnunet/contrib/defaults.conf
gnunet/src/statistics/gnunet-statistics.c
gnunet/src/topology/gnunet-daemon-topology.c
gnunet/src/transport/gnunet-service-transport.c
gnunet/src/transport/transport_api.c
Log:
more stats
Modified: gnunet/contrib/defaults.conf
===================================================================
--- gnunet/contrib/defaults.conf 2010-03-16 07:51:02 UTC (rev 10605)
+++ gnunet/contrib/defaults.conf 2010-03-16 08:32:22 UTC (rev 10606)
@@ -1,5 +1,6 @@
[PATHS]
-SERVICEHOME = /var/lib/gnunet/
+SERVICEHOME = ~/.gnunet/
+# SERVICEHOME = /var/lib/gnunet/
# DEFAULTCONFIG = /etc/gnunet.conf
# If 'DEFAULTCONFIG' is not defined, the current
# configuration file is assumed to be the default,
@@ -35,7 +36,7 @@
ACCEPT_FROM6 = ::1;
ALLOW_SHUTDOWN = YES
DEFAULTSERVICES = resolver transport core topology hostlist
-#GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
+GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
# GLOBAL_PREFIX =
# USERNAME =
# MAXBUF =
Modified: gnunet/src/statistics/gnunet-statistics.c
===================================================================
--- gnunet/src/statistics/gnunet-statistics.c 2010-03-16 07:51:02 UTC (rev
10605)
+++ gnunet/src/statistics/gnunet-statistics.c 2010-03-16 08:32:22 UTC (rev
10606)
@@ -179,7 +179,7 @@
return (GNUNET_OK ==
GNUNET_PROGRAM_run (argc,
argv,
- "gnunet-statistics",
+ "gnunet-statistics [options [value]]",
gettext_noop
("Print statistics about GNUnet operations."),
options, &run, NULL)) ? ret : 1;
Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c 2010-03-16 07:51:02 UTC
(rev 10605)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2010-03-16 08:32:22 UTC
(rev 10606)
@@ -34,7 +34,7 @@
#include "gnunet_util_lib.h"
-#define DEBUG_TOPOLOGY GNUNET_NO
+#define DEBUG_TOPOLOGY GNUNET_YES
/**
* For how long do we blacklist a peer after a failed connection
Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c 2010-03-16 07:51:02 UTC
(rev 10605)
+++ gnunet/src/transport/gnunet-service-transport.c 2010-03-16 08:32:22 UTC
(rev 10606)
@@ -2200,7 +2200,7 @@
"PING", sizeof (struct TransportPingMessage));
#endif
GNUNET_STATISTICS_update (stats,
- gettext_noop ("# PING messages sent"),
+ gettext_noop ("# PING messages sent for
re-validation"),
1,
GNUNET_NO);
transmit_to_peer (NULL, peer_address,
@@ -2277,6 +2277,10 @@
uint16_t hello_size;
size_t tsize;
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# peer addresses scheduled for
validation"),
+ 1,
+ GNUNET_NO);
tp = find_transport (tname);
if (tp == NULL)
{
@@ -2285,6 +2289,10 @@
_
("Transport `%s' not loaded, will not try to validate peer
address using this transport.\n"),
tname);
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# peer addresses not validated
(no applicable transport plugin available)"),
+ 1,
+ GNUNET_NO);
return GNUNET_OK;
}
GNUNET_HELLO_get_key (chvc->hello, &pk);
@@ -2312,6 +2320,10 @@
tname,
GNUNET_i2s (&id));
#endif
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# peer addresses not validated
(already in progress)"),
+ 1,
+ GNUNET_NO);
return GNUNET_OK;
}
va = GNUNET_malloc (sizeof (struct ValidationEntry) + addrlen);
@@ -2357,6 +2369,10 @@
"HELLO", hello_size,
"PING", sizeof (struct TransportPingMessage));
#endif
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# PING messages sent for initial
validation"),
+ 1,
+ GNUNET_NO);
transmit_to_peer (NULL, peer_address,
GNUNET_SCHEDULER_PRIORITY_DEFAULT,
HELLO_VERIFICATION_TIMEOUT,
@@ -2460,16 +2476,33 @@
"HELLO",
GNUNET_i2s (&target));
#endif
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# new HELLOs requiring full
validation"),
+ 1,
+ GNUNET_NO);
GNUNET_HELLO_iterate_addresses (chvc->hello,
GNUNET_NO,
&run_validation,
chvc);
}
+ else
+ {
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# duplicate HELLO (peer
known)"),
+ 1,
+ GNUNET_NO);
+ }
GNUNET_free (chvc);
return;
- }
+ }
if (h == NULL)
return;
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Peerinfo had `%s' message for peer `%4s', validating only new
addresses.\n",
+ "HELLO",
+ GNUNET_i2s (peer));
+#endif
chvc->hello_known = GNUNET_YES;
n = find_neighbour (peer);
if (n != NULL)
@@ -2515,7 +2548,10 @@
if (GNUNET_SCHEDULER_get_load (sched,
GNUNET_SCHEDULER_PRIORITY_BACKGROUND) >
MAX_HELLO_LOAD)
{
- /* TODO: call to stats? */
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# HELLOs ignored due to high
load"),
+ 1,
+ GNUNET_NO);
return GNUNET_OK;
}
hello = (const struct GNUNET_HELLO_Message *) message;
@@ -2527,6 +2563,16 @@
GNUNET_CRYPTO_hash (&publicKey,
sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
&target.hashPubKey);
+ if (0 == memcmp (&my_identity,
+ &target,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# HELLOs ignored for validation
(is my own HELLO)"),
+ 1,
+ GNUNET_NO);
+ return GNUNET_OK;
+ }
#if DEBUG_TRANSPORT > 1
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Processing `%s' message for `%4s' of size %u\n",
@@ -2976,6 +3022,10 @@
{
int ret;
+ GNUNET_STATISTICS_update (stats,
+ gettext_noop ("# HELLOs received from clients"),
+ 1,
+ GNUNET_NO);
ret = process_hello (NULL, message);
GNUNET_SERVER_receive_done (client, ret);
}
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2010-03-16 07:51:02 UTC (rev
10605)
+++ gnunet/src/transport/transport_api.c 2010-03-16 08:32:22 UTC (rev
10606)
@@ -984,6 +984,11 @@
struct GNUNET_MessageHeader *hc;
uint16_t size;
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Offering `%s' message to transport for validation.\n",
+ "HELLO");
+#endif
GNUNET_break (ntohs (hello->type) == GNUNET_MESSAGE_TYPE_HELLO);
size = ntohs (hello->size);
GNUNET_break (size >= sizeof (struct GNUNET_MessageHeader));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10606 - in gnunet: contrib src/statistics src/topology src/transport,
gnunet <=