diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-04-26 06:55:09 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-04-26 06:55:09 +0000 |
commit | e736e206111314544d85c07cd9cc3a1409f25a2f (patch) | |
tree | 5b727d1230ccda234ed04ea408fabd35efdfd567 /src/regex | |
parent | 5aab79b00f45105842d4d9899e6b17334ec9af09 (diff) | |
download | gnunet-e736e206111314544d85c07cd9cc3a1409f25a2f.tar.gz gnunet-e736e206111314544d85c07cd9cc3a1409f25a2f.zip |
- add feedback for testbed setup
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/gnunet-regex-profiler.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index d6c29a441..60393c65e 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -1122,6 +1122,30 @@ test_master (void *cls, | |||
1122 | GNUNET_SCHEDULER_add_delayed (search_timeout_time, &search_timeout, NULL); | 1122 | GNUNET_SCHEDULER_add_delayed (search_timeout_time, &search_timeout, NULL); |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | /** | ||
1126 | * Function that will be called whenever something in the testbed changes. | ||
1127 | * | ||
1128 | * @param cls closure, NULL | ||
1129 | * @param event information on what is happening | ||
1130 | */ | ||
1131 | static void | ||
1132 | master_controller_cb (void *cls, | ||
1133 | const struct GNUNET_TESTBED_EventInformation *event) | ||
1134 | { | ||
1135 | switch (event->type) | ||
1136 | { | ||
1137 | case GNUNET_TESTBED_ET_CONNECT: | ||
1138 | printf("."); | ||
1139 | break; | ||
1140 | case GNUNET_TESTBED_ET_PEER_START: | ||
1141 | printf("#"); | ||
1142 | break; | ||
1143 | default: | ||
1144 | break; | ||
1145 | } | ||
1146 | fflush(stdout); | ||
1147 | } | ||
1148 | |||
1125 | 1149 | ||
1126 | /******************************************************************************/ | 1150 | /******************************************************************************/ |
1127 | /*************************** TESTBED PEER SETUP *****************************/ | 1151 | /*************************** TESTBED PEER SETUP *****************************/ |
@@ -1328,17 +1352,17 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1328 | } | 1352 | } |
1329 | 1353 | ||
1330 | event_mask = 0LL; | 1354 | event_mask = 0LL; |
1331 | /* For feedback about the start process activate these and pass master_cb | 1355 | /* For feedback about the start process activate these and pass master_cb */ |
1332 | event_mask |= (1LL << GNUNET_TESTBED_ET_PEER_START); | 1356 | event_mask |= (1LL << GNUNET_TESTBED_ET_PEER_START); |
1333 | event_mask |= (1LL << GNUNET_TESTBED_ET_PEER_STOP); | 1357 | // event_mask |= (1LL << GNUNET_TESTBED_ET_PEER_STOP); |
1334 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); | 1358 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); |
1335 | event_mask |= (1LL << GNUNET_TESTBED_ET_DISCONNECT);*/ | 1359 | // event_mask |= (1LL << GNUNET_TESTBED_ET_DISCONNECT); |
1336 | prof_start_time = GNUNET_TIME_absolute_get (); | 1360 | prof_start_time = GNUNET_TIME_absolute_get (); |
1337 | GNUNET_TESTBED_run (args[0], | 1361 | GNUNET_TESTBED_run (args[0], |
1338 | cfg, | 1362 | cfg, |
1339 | num_peers, | 1363 | num_peers, |
1340 | event_mask, | 1364 | event_mask, |
1341 | NULL, /* master_controller_cb, */ | 1365 | &master_controller_cb, |
1342 | NULL, /* master_controller_cb cls */ | 1366 | NULL, /* master_controller_cb cls */ |
1343 | &test_master, | 1367 | &test_master, |
1344 | NULL); /* test_master cls */ | 1368 | NULL); /* test_master cls */ |