[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16143 - gnunet/src/nse
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16143 - gnunet/src/nse |
Date: |
Fri, 22 Jul 2011 14:47:54 +0200 |
Author: nevans
Date: 2011-07-22 14:47:54 +0200 (Fri, 22 Jul 2011)
New Revision: 16143
Modified:
gnunet/src/nse/gnunet-service-nse.c
gnunet/src/nse/nse-profiler.c
Log:
larger history, connect limit
Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2011-07-21 19:17:28 UTC (rev 16142)
+++ gnunet/src/nse/gnunet-service-nse.c 2011-07-22 12:47:54 UTC (rev 16143)
@@ -50,7 +50,7 @@
#include "gnunet_nse_service.h"
#include "nse.h"
-#define DEFAULT_HISTORY_SIZE 10
+#define DEFAULT_HISTORY_SIZE 20
#define DEFAULT_CORE_QUEUE_SIZE 32
Modified: gnunet/src/nse/nse-profiler.c
===================================================================
--- gnunet/src/nse/nse-profiler.c 2011-07-21 19:17:28 UTC (rev 16142)
+++ gnunet/src/nse/nse-profiler.c 2011-07-22 12:47:54 UTC (rev 16143)
@@ -31,6 +31,8 @@
#define VERBOSE GNUNET_NO
+#define CONNECT_LIMIT GNUNET_YES
+
struct NSEPeer
{
struct NSEPeer *prev;
@@ -135,6 +137,8 @@
static char *data_filename;
+static uint64_t clock_skew;
+
/**
* Check whether peers successfully shut down.
*/
@@ -225,6 +229,10 @@
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "TEST_NSE_MULTIPEER: connecting to
nse service of peers\n");
for (i = 0; i < num_peers; i++)
{
+#if CONNECT_LIMIT
+ if (i % 50 != 0)
+ continue;
+#endif
current_peer = GNUNET_malloc(sizeof(struct NSEPeer));
current_peer->daemon = GNUNET_TESTING_daemon_get(pg, i);
if (GNUNET_YES ==
GNUNET_TESTING_daemon_running(GNUNET_TESTING_daemon_get(pg, i)))
@@ -323,14 +331,15 @@
pos = peer_head;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "TEST_NSE_MULTIPEER: disconnecting
nse service of peers\n");
- while (pos != NULL)
+ while (NULL != (pos = peer_head))
{
if (pos->nse_handle != NULL)
{
GNUNET_NSE_disconnect(pos->nse_handle);
pos->nse_handle = NULL;
}
- pos = pos->next;
+ GNUNET_CONTAINER_DLL_remove(peer_head, peer_tail, pos);
+ GNUNET_free(pos);
}
GNUNET_asprintf(&buf, "round%llu", current_round);
@@ -552,7 +561,13 @@
return;
}
+ if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (testing_cfg,
"nse-profiler", "skew_clock"))
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Setting our clock as
skewed...\n");
+ clock_skew = GNUNET_CRYPTO_random_u64(GNUNET_CRYPTO_QUALITY_WEAK,
GNUNET_TIME_UNIT_MINUTES.rel_value);
+ }
+
data_file = GNUNET_DISK_file_open (data_filename, GNUNET_DISK_OPEN_READWRITE
| GNUNET_DISK_OPEN_CREATE,
GNUNET_DISK_PERM_USER_READ |
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16143 - gnunet/src/nse,
gnunet <=