diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-07-21 16:20:03 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-07-21 16:20:03 +0000 |
commit | 4c7df886253bc4b5ee13555ae578c93d538cb587 (patch) | |
tree | d30537718432ecd4295736ee4f1c8889befd8355 /src/nse | |
parent | 6249d417c793ffce4415d0f05cee153da86b9ea8 (diff) | |
download | gnunet-4c7df886253bc4b5ee13555ae578c93d538cb587.tar.gz gnunet-4c7df886253bc4b5ee13555ae578c93d538cb587.zip |
nse changes
Diffstat (limited to 'src/nse')
-rw-r--r-- | src/nse/gnunet-service-nse.c | 23 | ||||
-rw-r--r-- | src/nse/nse-profiler.c | 129 | ||||
-rw-r--r-- | src/nse/nse.h | 2 | ||||
-rw-r--r-- | src/nse/nse_profiler_test.conf | 32 | ||||
-rw-r--r-- | src/nse/test_nse.conf | 2 | ||||
-rw-r--r-- | src/nse/test_nse_multipeer.c | 2 |
6 files changed, 156 insertions, 34 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index eb5a72def..41b13a879 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -275,7 +275,7 @@ transmit_ready(void *cls, size_t size, void *buf) | |||
275 | 275 | ||
276 | size_t msize; | 276 | size_t msize; |
277 | peer_entry->th = NULL; | 277 | peer_entry->th = NULL; |
278 | #if DEBUG_NSE | 278 | #if DEBUG_NSE > 1 |
279 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s: transmit_ready called\n", | 279 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s: transmit_ready called\n", |
280 | GNUNET_i2s (&my_identity)); | 280 | GNUNET_i2s (&my_identity)); |
281 | #endif | 281 | #endif |
@@ -298,7 +298,7 @@ transmit_ready(void *cls, size_t size, void *buf) | |||
298 | msize = ntohs (peer_entry->pending_message->size); | 298 | msize = ntohs (peer_entry->pending_message->size); |
299 | if (msize <= size) | 299 | if (msize <= size) |
300 | memcpy (cbuf, peer_entry->pending_message, msize); | 300 | memcpy (cbuf, peer_entry->pending_message, msize); |
301 | #if DEBUG_NSE | 301 | #if DEBUG_NSE > 1 |
302 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 302 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
303 | "%s: transmit_ready called (transmit %d bytes)\n", | 303 | "%s: transmit_ready called (transmit %d bytes)\n", |
304 | GNUNET_i2s (&my_identity), msize); | 304 | GNUNET_i2s (&my_identity), msize); |
@@ -441,7 +441,7 @@ schedule_flood_message(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
441 | * GNUNET_NSE_INTERVAL; | 441 | * GNUNET_NSE_INTERVAL; |
442 | /* Find the next interval start time */ | 442 | /* Find the next interval start time */ |
443 | next_timestamp.abs_value = previous_timestamp.abs_value + GNUNET_NSE_INTERVAL; | 443 | next_timestamp.abs_value = previous_timestamp.abs_value + GNUNET_NSE_INTERVAL; |
444 | #if DEBUG_NSE | 444 | #if DEBUG_NSE > 1 |
445 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 445 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
446 | "%s: curr_time %lu, prev timestamp %lu, next timestamp %lu\n", | 446 | "%s: curr_time %lu, prev timestamp %lu, next timestamp %lu\n", |
447 | GNUNET_i2s (&my_identity), curr_time.abs_value, | 447 | GNUNET_i2s (&my_identity), curr_time.abs_value, |
@@ -474,7 +474,7 @@ schedule_flood_message(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
474 | millisecond_offset = ((double) GNUNET_NSE_INTERVAL / (double) 2) | 474 | millisecond_offset = ((double) GNUNET_NSE_INTERVAL / (double) 2) |
475 | - ((GNUNET_NSE_INTERVAL / M_PI) * atan (matching_bits | 475 | - ((GNUNET_NSE_INTERVAL / M_PI) * atan (matching_bits |
476 | - current_size_estimate)); | 476 | - current_size_estimate)); |
477 | #if DEBUG_NSE | 477 | #if DEBUG_NSE > 1 |
478 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 478 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
479 | "%s: id matches %d bits, offset is %lu\n\n", | 479 | "%s: id matches %d bits, offset is %lu\n\n", |
480 | GNUNET_i2s (&my_identity), matching_bits, | 480 | GNUNET_i2s (&my_identity), matching_bits, |
@@ -495,8 +495,8 @@ schedule_flood_message(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
495 | #if DEBUG_NSE | 495 | #if DEBUG_NSE |
496 | GNUNET_log ( | 496 | GNUNET_log ( |
497 | GNUNET_ERROR_TYPE_WARNING, | 497 | GNUNET_ERROR_TYPE_WARNING, |
498 | "%s: milliseconds until next timestamp %lu, sending flood in %lu\n", | 498 | "%s: %u bits match, %lu milliseconds to timestamp , sending flood in %lu\n", |
499 | GNUNET_i2s (&my_identity), | 499 | GNUNET_i2s (&my_identity), matching_bits, |
500 | GNUNET_TIME_absolute_get_remaining (next_timestamp).rel_value, | 500 | GNUNET_TIME_absolute_get_remaining (next_timestamp).rel_value, |
501 | offset.rel_value); | 501 | offset.rel_value); |
502 | #endif | 502 | #endif |
@@ -618,7 +618,7 @@ handle_p2p_size_estimate(void *cls, const struct GNUNET_PeerIdentity *peer, | |||
618 | struct GNUNET_TIME_Absolute curr_time; | 618 | struct GNUNET_TIME_Absolute curr_time; |
619 | uint64_t drift; | 619 | uint64_t drift; |
620 | 620 | ||
621 | #if DEBUG_NSE | 621 | #if DEBUG_NSE > 1 |
622 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s: received flood message!\n", | 622 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s: received flood message!\n", |
623 | GNUNET_i2s (&my_identity)); | 623 | GNUNET_i2s (&my_identity)); |
624 | #endif | 624 | #endif |
@@ -748,7 +748,7 @@ send_flood_message(void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
748 | if (peer_entry->th == NULL) | 748 | if (peer_entry->th == NULL) |
749 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 749 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
750 | "%s: transmit handle is null!\n", GNUNET_i2s (&my_identity)); | 750 | "%s: transmit handle is null!\n", GNUNET_i2s (&my_identity)); |
751 | #if DEBUG_NSE | 751 | #if DEBUG_NSE > 1 |
752 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 752 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
753 | "%s: Sending flood message (distance %d) to %s!\n", | 753 | "%s: Sending flood message (distance %d) to %s!\n", |
754 | GNUNET_i2s (&my_identity), ntohl (to_send->distance), | 754 | GNUNET_i2s (&my_identity), ntohl (to_send->distance), |
@@ -820,6 +820,7 @@ handle_core_disconnect(void *cls, const struct GNUNET_PeerIdentity *peer) | |||
820 | while ((NULL != pos) && (0 != memcmp (&pos->id, peer, | 820 | while ((NULL != pos) && (0 != memcmp (&pos->id, peer, |
821 | sizeof(struct GNUNET_PeerIdentity)))) | 821 | sizeof(struct GNUNET_PeerIdentity)))) |
822 | pos = pos->next; | 822 | pos = pos->next; |
823 | |||
823 | if (pos == NULL) | 824 | if (pos == NULL) |
824 | { | 825 | { |
825 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 826 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -828,12 +829,6 @@ handle_core_disconnect(void *cls, const struct GNUNET_PeerIdentity *peer) | |||
828 | return; | 829 | return; |
829 | } | 830 | } |
830 | 831 | ||
831 | /* TODO: decide whether to copy the message, or always use the static pointer */ | ||
832 | #if TODO | ||
833 | if (pos->pending_message != NULL) | ||
834 | GNUNET_free(pos->pending_message); | ||
835 | #endif | ||
836 | |||
837 | if (pos->th != NULL) | 832 | if (pos->th != NULL) |
838 | GNUNET_CORE_notify_transmit_ready_cancel (pos->th); | 833 | GNUNET_CORE_notify_transmit_ready_cancel (pos->th); |
839 | GNUNET_CONTAINER_DLL_remove(peers_head, peers_tail, pos); | 834 | GNUNET_CONTAINER_DLL_remove(peers_head, peers_tail, pos); |
diff --git a/src/nse/nse-profiler.c b/src/nse/nse-profiler.c index 7c3c7a5ec..70ea1a689 100644 --- a/src/nse/nse-profiler.c +++ b/src/nse/nse-profiler.c | |||
@@ -42,6 +42,14 @@ struct NSEPeer | |||
42 | struct GNUNET_NSE_Handle *nse_handle; | 42 | struct GNUNET_NSE_Handle *nse_handle; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | struct StatsContext | ||
46 | { | ||
47 | GNUNET_SCHEDULER_Task task; | ||
48 | GNUNET_SCHEDULER_TaskIdentifier *task_id; | ||
49 | void *task_cls; | ||
50 | unsigned long long total_nse_bytes; | ||
51 | }; | ||
52 | |||
45 | struct NSEPeer *peer_head; | 53 | struct NSEPeer *peer_head; |
46 | 54 | ||
47 | struct NSEPeer *peer_tail; | 55 | struct NSEPeer *peer_tail; |
@@ -99,6 +107,11 @@ static struct GNUNET_TESTING_PeerGroup *pg; | |||
99 | static struct GNUNET_DISK_FileHandle *output_file; | 107 | static struct GNUNET_DISK_FileHandle *output_file; |
100 | 108 | ||
101 | /** | 109 | /** |
110 | * File to log connection info, statistics to. | ||
111 | */ | ||
112 | static struct GNUNET_DISK_FileHandle *data_file; | ||
113 | |||
114 | /** | ||
102 | * How many data points to capture before triggering next round? | 115 | * How many data points to capture before triggering next round? |
103 | */ | 116 | */ |
104 | static struct GNUNET_TIME_Relative wait_time; | 117 | static struct GNUNET_TIME_Relative wait_time; |
@@ -118,7 +131,9 @@ static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle; | |||
118 | */ | 131 | */ |
119 | static GNUNET_SCHEDULER_TaskIdentifier churn_task; | 132 | static GNUNET_SCHEDULER_TaskIdentifier churn_task; |
120 | 133 | ||
121 | char *topology_file; | 134 | static char *topology_file; |
135 | |||
136 | static char *data_filename; | ||
122 | 137 | ||
123 | /** | 138 | /** |
124 | * Check whether peers successfully shut down. | 139 | * Check whether peers successfully shut down. |
@@ -166,6 +181,8 @@ shutdown_task (void *cls, | |||
166 | GNUNET_free(pos); | 181 | GNUNET_free(pos); |
167 | } | 182 | } |
168 | 183 | ||
184 | if (data_file != NULL) | ||
185 | GNUNET_DISK_file_close(data_file); | ||
169 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 186 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
170 | } | 187 | } |
171 | 188 | ||
@@ -196,7 +213,6 @@ handle_estimate (void *cls, double estimate, double std_dev) | |||
196 | 213 | ||
197 | } | 214 | } |
198 | 215 | ||
199 | |||
200 | static void | 216 | static void |
201 | connect_nse_service (void *cls, | 217 | connect_nse_service (void *cls, |
202 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 218 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
@@ -224,12 +240,85 @@ static void | |||
224 | churn_peers (void *cls, | 240 | churn_peers (void *cls, |
225 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 241 | const struct GNUNET_SCHEDULER_TaskContext *tc); |
226 | 242 | ||
243 | /** | ||
244 | * Continuation called by the "get_all" and "get" functions. | ||
245 | * | ||
246 | * @param cls struct StatsContext | ||
247 | * @param success GNUNET_OK if statistics were | ||
248 | * successfully obtained, GNUNET_SYSERR if not. | ||
249 | */ | ||
250 | static void stats_finished_callback (void *cls, int success) | ||
251 | { | ||
252 | struct StatsContext *stats_context = (struct StatsContext *)cls; | ||
253 | char *buf; | ||
254 | int buf_len; | ||
255 | |||
256 | if ((GNUNET_OK == success) && (data_file != NULL)) /* Stats lookup successful, write out data */ | ||
257 | { | ||
258 | buf = NULL; | ||
259 | buf_len = GNUNET_asprintf(&buf, "TOTAL_NSE_BYTES: %u\n", stats_context->total_nse_bytes); | ||
260 | if (buf_len > 0) | ||
261 | { | ||
262 | GNUNET_DISK_file_write(data_file, buf, buf_len); | ||
263 | } | ||
264 | GNUNET_free_non_null(buf); | ||
265 | } | ||
266 | |||
267 | if (stats_context->task != NULL) | ||
268 | (*stats_context->task_id) = GNUNET_SCHEDULER_add_now(stats_context->task, stats_context->task_cls); | ||
269 | |||
270 | GNUNET_free(stats_context); | ||
271 | } | ||
272 | |||
273 | /** | ||
274 | * Callback function to process statistic values. | ||
275 | * | ||
276 | * @param cls struct StatsContext | ||
277 | * @param peer the peer the statistics belong to | ||
278 | * @param subsystem name of subsystem that created the statistic | ||
279 | * @param name the name of the datum | ||
280 | * @param value the current value | ||
281 | * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not | ||
282 | * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration | ||
283 | */ | ||
284 | static int statistics_iterator (void *cls, | ||
285 | const struct GNUNET_PeerIdentity *peer, | ||
286 | const char *subsystem, | ||
287 | const char *name, | ||
288 | uint64_t value, | ||
289 | int is_persistent) | ||
290 | { | ||
291 | struct StatsContext *stats_context = (struct StatsContext *)cls; | ||
292 | char *buf; | ||
293 | |||
294 | GNUNET_assert(0 < GNUNET_asprintf(&buf, "bytes of messages of type %d received", GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD)); | ||
295 | if ((0 == strstr(subsystem, "core")) && (0 == strstr(name, buf))) | ||
296 | { | ||
297 | stats_context->total_nse_bytes += value; | ||
298 | } | ||
299 | GNUNET_free(buf); | ||
300 | return GNUNET_OK; | ||
301 | } | ||
302 | |||
303 | /** | ||
304 | * @param cls struct StatsContext | ||
305 | * @param tc task context | ||
306 | */ | ||
307 | static void | ||
308 | get_statistics (void *cls, | ||
309 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
310 | { | ||
311 | struct StatsContext *stats_context = (struct StatsContext *)cls; | ||
312 | GNUNET_TESTING_get_statistics(pg, &stats_finished_callback, &statistics_iterator, stats_context); | ||
313 | } | ||
314 | |||
227 | static void | 315 | static void |
228 | disconnect_nse_peers (void *cls, | 316 | disconnect_nse_peers (void *cls, |
229 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 317 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
230 | { | 318 | { |
231 | struct NSEPeer *pos; | 319 | struct NSEPeer *pos; |
232 | char *buf; | 320 | char *buf; |
321 | struct StatsContext *stats_context; | ||
233 | disconnect_task = GNUNET_SCHEDULER_NO_TASK; | 322 | disconnect_task = GNUNET_SCHEDULER_NO_TASK; |
234 | pos = peer_head; | 323 | pos = peer_head; |
235 | 324 | ||
@@ -253,8 +342,14 @@ disconnect_nse_peers (void *cls, | |||
253 | } | 342 | } |
254 | else /* No more rounds, let's shut it down! */ | 343 | else /* No more rounds, let's shut it down! */ |
255 | { | 344 | { |
345 | stats_context = GNUNET_malloc(sizeof(struct StatsContext)); | ||
256 | GNUNET_SCHEDULER_cancel(shutdown_handle); | 346 | GNUNET_SCHEDULER_cancel(shutdown_handle); |
257 | shutdown_handle = GNUNET_SCHEDULER_add_now(&shutdown_task, NULL); | 347 | shutdown_handle = GNUNET_SCHEDULER_NO_TASK; |
348 | stats_context->task = &shutdown_task; | ||
349 | stats_context->task_cls = NULL; | ||
350 | stats_context->task_id = &shutdown_handle; | ||
351 | GNUNET_SCHEDULER_add_now(&get_statistics, stats_context); | ||
352 | //shutdown_handle = GNUNET_SCHEDULER_add_now(&shutdown_task, NULL); | ||
258 | } | 353 | } |
259 | GNUNET_free(buf); | 354 | GNUNET_free(buf); |
260 | } | 355 | } |
@@ -268,6 +363,9 @@ disconnect_nse_peers (void *cls, | |||
268 | */ | 363 | */ |
269 | void topology_output_callback (void *cls, const char *emsg) | 364 | void topology_output_callback (void *cls, const char *emsg) |
270 | { | 365 | { |
366 | struct StatsContext *stats_context; | ||
367 | stats_context = GNUNET_malloc(sizeof(struct StatsContext)); | ||
368 | |||
271 | disconnect_task = GNUNET_SCHEDULER_add_delayed(wait_time, &disconnect_nse_peers, NULL); | 369 | disconnect_task = GNUNET_SCHEDULER_add_delayed(wait_time, &disconnect_nse_peers, NULL); |
272 | GNUNET_SCHEDULER_add_now(&connect_nse_service, NULL); | 370 | GNUNET_SCHEDULER_add_now(&connect_nse_service, NULL); |
273 | } | 371 | } |
@@ -353,6 +451,8 @@ static void | |||
353 | my_cb (void *cls, | 451 | my_cb (void *cls, |
354 | const char *emsg) | 452 | const char *emsg) |
355 | { | 453 | { |
454 | char *buf; | ||
455 | int buf_len; | ||
356 | if (emsg != NULL) | 456 | if (emsg != NULL) |
357 | { | 457 | { |
358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 458 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -367,6 +467,14 @@ my_cb (void *cls, | |||
367 | "Peer Group started successfully, connecting to NSE service for each peer!\n"); | 467 | "Peer Group started successfully, connecting to NSE service for each peer!\n"); |
368 | #endif | 468 | #endif |
369 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n", total_connections); | 469 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n", total_connections); |
470 | if (data_file != NULL) | ||
471 | { | ||
472 | buf = NULL; | ||
473 | buf_len = GNUNET_asprintf(&buf, "CONNECTIONS_0: %u\n", total_connections); | ||
474 | if (buf_len > 0) | ||
475 | GNUNET_DISK_file_write(data_file, buf, buf_len); | ||
476 | GNUNET_free_non_null(buf); | ||
477 | } | ||
370 | peers_running = GNUNET_TESTING_daemons_running(pg); | 478 | peers_running = GNUNET_TESTING_daemons_running(pg); |
371 | GNUNET_SCHEDULER_add_now(&connect_nse_service, NULL); | 479 | GNUNET_SCHEDULER_add_now(&connect_nse_service, NULL); |
372 | disconnect_task = GNUNET_SCHEDULER_add_delayed(wait_time, &disconnect_nse_peers, NULL); | 480 | disconnect_task = GNUNET_SCHEDULER_add_delayed(wait_time, &disconnect_nse_peers, NULL); |
@@ -438,6 +546,21 @@ run (void *cls, | |||
438 | return; | 546 | return; |
439 | } | 547 | } |
440 | 548 | ||
549 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (testing_cfg, "nse-profiler", "data_output_file", &data_filename)) | ||
550 | { | ||
551 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Option nse-profiler:data_output_file is required!\n"); | ||
552 | return; | ||
553 | } | ||
554 | |||
555 | |||
556 | data_file = GNUNET_DISK_file_open (data_filename, GNUNET_DISK_OPEN_READWRITE | ||
557 | | GNUNET_DISK_OPEN_CREATE, | ||
558 | GNUNET_DISK_PERM_USER_READ | | ||
559 | GNUNET_DISK_PERM_USER_WRITE); | ||
560 | if (data_file == NULL) | ||
561 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", data_filename); | ||
562 | GNUNET_free(data_filename); | ||
563 | |||
441 | wait_time = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, temp_wait); | 564 | wait_time = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, temp_wait); |
442 | 565 | ||
443 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string(cfg, "nse-profiler", "output_file", &temp_str)) | 566 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string(cfg, "nse-profiler", "output_file", &temp_str)) |
diff --git a/src/nse/nse.h b/src/nse/nse.h index f0a914488..a1bf2b1dd 100644 --- a/src/nse/nse.h +++ b/src/nse/nse.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #include "gnunet_common.h" | 31 | #include "gnunet_common.h" |
32 | 32 | ||
33 | #define DEBUG_NSE GNUNET_NO | 33 | #define DEBUG_NSE GNUNET_YES |
34 | 34 | ||
35 | #define VERIFY_CRYPTO GNUNET_NO | 35 | #define VERIFY_CRYPTO GNUNET_NO |
36 | 36 | ||
diff --git a/src/nse/nse_profiler_test.conf b/src/nse/nse_profiler_test.conf index 5e05cf422..7da26b232 100644 --- a/src/nse/nse_profiler_test.conf +++ b/src/nse/nse_profiler_test.conf | |||
@@ -14,7 +14,7 @@ CONFIG = $DEFAULTCONFIG | |||
14 | 14 | ||
15 | [arm] | 15 | [arm] |
16 | PORT = 0 | 16 | PORT = 0 |
17 | DEFAULTSERVICES = nse core topology | 17 | DEFAULTSERVICES = core |
18 | UNIXPATH = /tmp/test-nse-service-arm.unix | 18 | UNIXPATH = /tmp/test-nse-service-arm.unix |
19 | #DEBUG = YES | 19 | #DEBUG = YES |
20 | 20 | ||
@@ -36,6 +36,7 @@ AUTOSTART = YES | |||
36 | 36 | ||
37 | [transport-unix] | 37 | [transport-unix] |
38 | PORT = 11111 | 38 | PORT = 11111 |
39 | |||
39 | [core] | 40 | [core] |
40 | AUTOSTART = YES | 41 | AUTOSTART = YES |
41 | 42 | ||
@@ -47,6 +48,7 @@ AUTOSTART = NO | |||
47 | 48 | ||
48 | [topology] | 49 | [topology] |
49 | PORT = 0 | 50 | PORT = 0 |
51 | AUTOSTART = NO | ||
50 | 52 | ||
51 | [transport] | 53 | [transport] |
52 | PORT = 0 | 54 | PORT = 0 |
@@ -57,25 +59,27 @@ NUM_PEERS = 1000 | |||
57 | WEAKRANDOM = YES | 59 | WEAKRANDOM = YES |
58 | TOPOLOGY = NONE | 60 | TOPOLOGY = NONE |
59 | CONNECT_TOPOLOGY = SMALL_WORLD_RING | 61 | CONNECT_TOPOLOGY = SMALL_WORLD_RING |
60 | PERCENTAGE = 5 | 62 | PERCENTAGE = 4 |
61 | F2F = NO | 63 | F2F = NO |
62 | CONNECT_TIMEOUT = 60 | 64 | CONNECT_TIMEOUT = 60 |
63 | CONNECT_ATTEMPTS = 3 | 65 | CONNECT_ATTEMPTS = 3 |
64 | #DEBUG = YES | 66 | #DEBUG = YES |
65 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 67 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
66 | MAX_CONCURRENT_SSH = 1 | 68 | MAX_CONCURRENT_SSH = 20 |
67 | USE_PROGRESSBARS = YES | 69 | USE_PROGRESSBARS = YES |
68 | PEERGROUP_TIMEOUT = 1000 | 70 | PEERGROUP_TIMEOUT = 1000 |
69 | MAX_OUTSTANDING_CONNECTIONS = 20 | 71 | TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial |
72 | MAX_OUTSTANDING_CONNECTIONS = 200 | ||
73 | #SINGLE_PEERINFO_PER_HOST = YES | ||
74 | #NUM_PEERINFO_PER_HOST = 10 | ||
75 | #SINGLE_STATISTICS_PER_HOST = YES | ||
76 | #NUM_STATISTICS_PER_HOST = 10 | ||
70 | 77 | ||
71 | [nse-profiler] | 78 | [nse-profiler] |
72 | OUTPUT_FILE = nse_output_1000_peers.dat | 79 | #OUTPUT_FILE = nse_output_1000_peers.dat |
73 | ROUND0 = 1000 | 80 | #TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers |
74 | ROUND1 = 750 | 81 | #ROUND0 = 75 |
75 | ROUND2 = 500 | 82 | #ROUND1 = 750 |
76 | ROUND3 = 1000 | 83 | #ROUND2 = 500 |
77 | WAIT_TIME = 800 | 84 | #ROUND3 = 1000 |
78 | 85 | WAIT_TIME = 7200 | |
79 | |||
80 | |||
81 | |||
diff --git a/src/nse/test_nse.conf b/src/nse/test_nse.conf index 6a87e1bb7..17574a748 100644 --- a/src/nse/test_nse.conf +++ b/src/nse/test_nse.conf | |||
@@ -40,7 +40,7 @@ AUTOSTART = YES | |||
40 | AUTOSTART = NO | 40 | AUTOSTART = NO |
41 | 41 | ||
42 | [testing] | 42 | [testing] |
43 | NUM_PEERS = 100 | 43 | NUM_PEERS = 20 |
44 | WEAKRANDOM = YES | 44 | WEAKRANDOM = YES |
45 | TOPOLOGY = NONE | 45 | TOPOLOGY = NONE |
46 | CONNECT_TOPOLOGY = SMALL_WORLD_RING | 46 | CONNECT_TOPOLOGY = SMALL_WORLD_RING |
diff --git a/src/nse/test_nse_multipeer.c b/src/nse/test_nse_multipeer.c index 4edf53f20..2f538b62c 100644 --- a/src/nse/test_nse_multipeer.c +++ b/src/nse/test_nse_multipeer.c | |||
@@ -193,7 +193,7 @@ void connect_cb (void *cls, | |||
193 | second_id = GNUNET_strdup(GNUNET_i2s(second)); | 193 | second_id = GNUNET_strdup(GNUNET_i2s(second)); |
194 | if (emsg == NULL) | 194 | if (emsg == NULL) |
195 | { | 195 | { |
196 | fprintf(stderr, "Connected %s -> %s\n", GNUNET_i2s(first), second_id); | 196 | //fprintf(stderr, "Connected %s -> %s\n", GNUNET_i2s(first), second_id); |
197 | total_connections++; | 197 | total_connections++; |
198 | } | 198 | } |
199 | } | 199 | } |