diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-27 17:23:31 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-27 17:23:31 +0000 |
commit | f7f6d5a8ea75b488a84b5ed1e550c6ac7ef82724 (patch) | |
tree | 400dd097a717b867c1799f3c72836307c458d0fc /src/testbed/gnunet-testbed-profiler.c | |
parent | e0561f734723672019c1612b202ae2705dadedc9 (diff) | |
download | gnunet-f7f6d5a8ea75b488a84b5ed1e550c6ac7ef82724.tar.gz gnunet-f7f6d5a8ea75b488a84b5ed1e550c6ac7ef82724.zip |
get hosts from loadleveler instead of reading them from hostlist
Diffstat (limited to 'src/testbed/gnunet-testbed-profiler.c')
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index ebb82dfcf..5cca55b4b 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -226,11 +226,17 @@ static void | |||
226 | run (void *cls, char *const *args, const char *cfgfile, | 226 | run (void *cls, char *const *args, const char *cfgfile, |
227 | const struct GNUNET_CONFIGURATION_Handle *config) | 227 | const struct GNUNET_CONFIGURATION_Handle *config) |
228 | { | 228 | { |
229 | char *hostfile; | ||
230 | |||
231 | hostfile = NULL; | ||
232 | #ifndef WITH_LL | ||
229 | if (NULL == args[0]) | 233 | if (NULL == args[0]) |
230 | { | 234 | { |
231 | fprintf (stderr, _("No hosts-file specified on command line\n")); | 235 | fprintf (stderr, _("No hosts-file specified on command line\n")); |
232 | return; | 236 | return; |
233 | } | 237 | } |
238 | hostfile = args[0]; | ||
239 | #endif | ||
234 | if (0 == num_peers) | 240 | if (0 == num_peers) |
235 | { | 241 | { |
236 | result = GNUNET_OK; | 242 | result = GNUNET_OK; |
@@ -240,7 +246,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
240 | event_mask = 0; | 246 | event_mask = 0; |
241 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); | 247 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); |
242 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 248 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
243 | GNUNET_TESTBED_run (args[0], cfg, num_peers, event_mask, controller_event_cb, | 249 | GNUNET_TESTBED_run (hostfile, cfg, num_peers, event_mask, controller_event_cb, |
244 | NULL, &test_run, NULL); | 250 | NULL, &test_run, NULL); |
245 | abort_task = | 251 | abort_task = |
246 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_abort, | 252 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_abort, |
@@ -265,15 +271,20 @@ main (int argc, char *const *argv) | |||
265 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_cont_fails}, | 271 | GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_cont_fails}, |
266 | GNUNET_GETOPT_OPTION_END | 272 | GNUNET_GETOPT_OPTION_END |
267 | }; | 273 | }; |
274 | #ifdef WITH_LL | ||
275 | const char *binaryHelp = "gnunet-testbed-profiler [OPTIONS]"; | ||
276 | #else | ||
277 | const char *binaryHelp = "gnunet-testbed-profiler [OPTIONS] hosts-file"; | ||
278 | #endif | ||
279 | |||
268 | int ret; | 280 | int ret; |
269 | 281 | ||
270 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 282 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
271 | return 2; | 283 | return 2; |
272 | result = GNUNET_SYSERR; | 284 | result = GNUNET_SYSERR; |
273 | ret = | 285 | ret = |
274 | GNUNET_PROGRAM_run (argc, argv, | 286 | GNUNET_PROGRAM_run (argc, argv, binaryHelp, _("Profiler for testbed"), |
275 | "gnunet-testbed-profiler [OPTIONS] hosts-file", | 287 | options, &run, NULL); |
276 | _("Profiler for testbed"), options, &run, NULL); | ||
277 | GNUNET_free ((void *) argv); | 288 | GNUNET_free ((void *) argv); |
278 | if (GNUNET_OK != ret) | 289 | if (GNUNET_OK != ret) |
279 | return ret; | 290 | return ret; |