diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-12 11:43:32 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-12 11:43:32 +0000 |
commit | 740d282b2fa094561b583fc171914ec79d2d7441 (patch) | |
tree | 5120bef8e00c9c3c21876bef94556d935258a6ae /src/transport/test_transport_ats.c | |
parent | 07880e1e1b81c800680175aac200ccaa5efbb94e (diff) | |
download | gnunet-740d282b2fa094561b583fc171914ec79d2d7441.tar.gz gnunet-740d282b2fa094561b583fc171914ec79d2d7441.zip |
improved mlp reoptimization
Diffstat (limited to 'src/transport/test_transport_ats.c')
-rw-r--r-- | src/transport/test_transport_ats.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/transport/test_transport_ats.c b/src/transport/test_transport_ats.c index d86fbbf4a..5c5334812 100644 --- a/src/transport/test_transport_ats.c +++ b/src/transport/test_transport_ats.c | |||
@@ -64,14 +64,15 @@ static int r_index; | |||
64 | //static int measurements; | 64 | //static int measurements; |
65 | static int connected; | 65 | static int connected; |
66 | static int peers; | 66 | static int peers; |
67 | |||
67 | static struct TEST_result results[MEASUREMENTS]; | 68 | static struct TEST_result results[MEASUREMENTS]; |
68 | 69 | ||
69 | struct GNUNET_STATISTICS_GetHandle * s_solution; | 70 | static struct GNUNET_STATISTICS_GetHandle * s_solution; |
70 | struct GNUNET_STATISTICS_GetHandle * s_time; | 71 | static struct GNUNET_STATISTICS_GetHandle * s_time; |
71 | struct GNUNET_STATISTICS_GetHandle * s_peers; | 72 | static struct GNUNET_STATISTICS_GetHandle * s_peers; |
72 | struct GNUNET_STATISTICS_GetHandle * s_mechs; | 73 | static struct GNUNET_STATISTICS_GetHandle * s_mechs; |
73 | struct GNUNET_STATISTICS_GetHandle * s_duration; | 74 | static struct GNUNET_STATISTICS_GetHandle * s_duration; |
74 | struct GNUNET_STATISTICS_GetHandle * s_invalid; | 75 | static struct GNUNET_STATISTICS_GetHandle * s_invalid; |
75 | 76 | ||
76 | /** | 77 | /** |
77 | * Check whether peers successfully shut down. | 78 | * Check whether peers successfully shut down. |
@@ -239,10 +240,10 @@ int stats_cb (void *cls, | |||
239 | if (results[r_index].timestamp != value) | 240 | if (results[r_index].timestamp != value) |
240 | { | 241 | { |
241 | r_index++; | 242 | r_index++; |
242 | fprintf(stderr, "(%i/%i)", r_index, MEASUREMENTS); | 243 | fprintf(stdout, "(%i/%i)", r_index, MEASUREMENTS); |
243 | if (r_index >= MEASUREMENTS) | 244 | if (r_index >= MEASUREMENTS) |
244 | { | 245 | { |
245 | fprintf(stderr, "\n"); | 246 | fprintf(stdout, "\n"); |
246 | if (stats_task != GNUNET_SCHEDULER_NO_TASK) | 247 | if (stats_task != GNUNET_SCHEDULER_NO_TASK) |
247 | { | 248 | { |
248 | GNUNET_SCHEDULER_cancel(stats_task); | 249 | GNUNET_SCHEDULER_cancel(stats_task); |
@@ -251,7 +252,7 @@ int stats_cb (void *cls, | |||
251 | evaluate_measurements(); | 252 | evaluate_measurements(); |
252 | return GNUNET_SYSERR; | 253 | return GNUNET_SYSERR; |
253 | } | 254 | } |
254 | fprintf(stderr, ".."); | 255 | fprintf(stdout, ".."); |
255 | 256 | ||
256 | results[r_index].timestamp = value; | 257 | results[r_index].timestamp = value; |
257 | return GNUNET_OK; | 258 | return GNUNET_OK; |
@@ -454,17 +455,18 @@ main (int argc, char *argv[]) | |||
454 | #if VERBOSE | 455 | #if VERBOSE |
455 | "DEBUG", | 456 | "DEBUG", |
456 | #else | 457 | #else |
457 | "WARNING", | 458 | "INFO", |
458 | #endif | 459 | #endif |
459 | NULL); | 460 | NULL); |
460 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing"); | 461 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing"); |
461 | 462 | ||
462 | peers = NUM_PEERS; | 463 | peers = NUM_PEERS; |
463 | if (argc >= 2) | 464 | if (argc == 2) |
464 | { | 465 | { |
465 | peers = atoi(argv[1]); | 466 | peers = atoi(argv[1]); |
466 | peers++; | 467 | peers++; |
467 | } | 468 | } |
469 | |||
468 | ret = check (); | 470 | ret = check (); |
469 | /** | 471 | /** |
470 | * Still need to remove the base testing directory here, | 472 | * Still need to remove the base testing directory here, |