aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/consensus/gnunet-consensus-profiler.c74
-rw-r--r--src/scalarproduct/gnunet-scalarproduct.c7
-rw-r--r--src/set/gnunet-set-ibf-profiler.c49
3 files changed, 89 insertions, 41 deletions
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c
index 65542f4cd..8cc1b3512 100644
--- a/src/consensus/gnunet-consensus-profiler.c
+++ b/src/consensus/gnunet-consensus-profiler.c
@@ -515,31 +515,55 @@ run (void *cls, char *const *args, const char *cfgfile,
515int 515int
516main (int argc, char **argv) 516main (int argc, char **argv)
517{ 517{
518 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 518 struct GNUNET_GETOPT_CommandLineOption options[] = {
519 { 'n', "num-peers", NULL, 519
520 gettext_noop ("number of peers in consensus"), 520 GNUNET_GETOPT_OPTION_SET_UINT ('n',
521 GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_peers }, 521 "num-peers",
522 { 'k', "value-replication", NULL, 522 NULL,
523 gettext_noop ("how many peers (random selection without replacement) receive one value?"), 523 gettext_noop ("number of peers in consensus"),
524 GNUNET_YES, &GNUNET_GETOPT_set_uint, &replication }, 524 &num_peers),
525 { 'x', "num-values", NULL, 525
526 gettext_noop ("number of values"), 526 GNUNET_GETOPT_OPTION_SET_UINT ('k',
527 GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_values }, 527 "value-replication",
528 { 't', "timeout", NULL, 528 NULL,
529 gettext_noop ("consensus timeout"), 529 gettext_noop ("how many peers (random selection without replacement) receive one value?"),
530 GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &conclude_timeout }, 530 &replication),
531 { 'd', "delay", NULL, 531
532 gettext_noop ("delay until consensus starts"), 532 GNUNET_GETOPT_OPTION_SET_UINT ('x',
533 GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &consensus_delay }, 533 "num-values",
534 { 's', "statistics", NULL, 534 NULL,
535 gettext_noop ("write statistics to file"), 535 gettext_noop ("number of values"),
536 GNUNET_YES, &GNUNET_GETOPT_set_filename, &statistics_filename }, 536 &num_values),
537 { 'S', "dist-static", NULL, 537
538 gettext_noop ("distribute elements to a static subset of good peers"), 538 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
539 GNUNET_YES, &GNUNET_GETOPT_set_one, &dist_static }, 539 "timeout",
540 { 'V', "verbose", NULL, 540 NULL,
541 gettext_noop ("be more verbose (print received values)"), 541 gettext_noop ("consensus timeout"),
542 GNUNET_NO, &GNUNET_GETOPT_set_one, &verbose }, 542 &conclude_timeout),
543
544
545 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
546 "delay",
547 NULL,
548 gettext_noop ("delay until consensus starts"),
549 &consensus_delay),
550
551 GNUNET_GETOPT_OPTION_FILENAME ('s',
552 "statistics",
553 "FILENAME",
554 gettext_noop ("write statistics to file"),
555 &statistics_filename),
556
557 GNUNET_GETOPT_OPTION_SET_ONE ('S',
558 "dist-static",
559 gettext_noop ("distribute elements to a static subset of good peers"),
560 &dist_static),
561
562 GNUNET_GETOPT_OPTION_SET_ONE ('V',
563 "verbose",
564 gettext_noop ("be more verbose (print received values)"),
565 &verbose),
566
543 GNUNET_GETOPT_OPTION_END 567 GNUNET_GETOPT_OPTION_END
544 }; 568 };
545 conclude_timeout = GNUNET_TIME_UNIT_SECONDS; 569 conclude_timeout = GNUNET_TIME_UNIT_SECONDS;
diff --git a/src/scalarproduct/gnunet-scalarproduct.c b/src/scalarproduct/gnunet-scalarproduct.c
index aa894b61d..773283959 100644
--- a/src/scalarproduct/gnunet-scalarproduct.c
+++ b/src/scalarproduct/gnunet-scalarproduct.c
@@ -344,6 +344,13 @@ int
344main (int argc, char *const *argv) 344main (int argc, char *const *argv)
345{ 345{
346 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 346 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
347
348 GNUNET_GETOPT_OPTION_STRING ('e',
349 "elements",
350 "\"key1,val1;key2,val2;...,keyn,valn;\"",
351 gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."),
352 &input_elements),
353
347 {'e', "elements", "\"key1,val1;key2,val2;...,keyn,valn;\"", 354 {'e', "elements", "\"key1,val1;key2,val2;...,keyn,valn;\"",
348 gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), 355 gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."),
349 1, &GNUNET_GETOPT_set_string, &input_elements}, 356 1, &GNUNET_GETOPT_set_string, &input_elements},
diff --git a/src/set/gnunet-set-ibf-profiler.c b/src/set/gnunet-set-ibf-profiler.c
index 8d832e358..ac86a900d 100644
--- a/src/set/gnunet-set-ibf-profiler.c
+++ b/src/set/gnunet-set-ibf-profiler.c
@@ -244,24 +244,41 @@ run (void *cls,
244int 244int
245main (int argc, char **argv) 245main (int argc, char **argv)
246{ 246{
247 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 247 struct GNUNET_GETOPT_CommandLineOption options[] = {
248 {'A', "asize", NULL, 248
249 gettext_noop ("number of element in set A-B"), 1, 249 GNUNET_GETOPT_OPTION_SET_UINT ('A',
250 &GNUNET_GETOPT_set_uint, &asize}, 250 "asize",
251 {'B', "bsize", NULL, 251 NULL,
252 gettext_noop ("number of element in set B-A"), 1, 252 gettext_noop ("number of element in set A-B"),
253 &GNUNET_GETOPT_set_uint, &bsize}, 253 &asize),
254 {'C', "csize", NULL, 254
255 gettext_noop ("number of common elements in A and B"), 1, 255 GNUNET_GETOPT_OPTION_SET_UINT ('B',
256 &GNUNET_GETOPT_set_uint, &csize}, 256 "bsize",
257 {'k', "hash-num", NULL, 257 NULL,
258 gettext_noop ("hash num"), 1, 258 gettext_noop ("number of element in set B-A"),
259 &GNUNET_GETOPT_set_uint, &hash_num}, 259 &bsize),
260 {'s', "ibf-size", NULL, 260
261 gettext_noop ("ibf size"), 1, 261 GNUNET_GETOPT_OPTION_SET_UINT ('C',
262 &GNUNET_GETOPT_set_uint, &ibf_size}, 262 "csize",
263 NULL,
264 gettext_noop ("number of common elements in A and B"),
265 &csize),
266
267 GNUNET_GETOPT_OPTION_SET_UINT ('k',
268 "hash-num",
269 NULL,
270 gettext_noop ("hash num"),
271 &hash_num),
272
273 GNUNET_GETOPT_OPTION_SET_UINT ('s',
274 "ibf-size",
275 NULL,
276 gettext_noop ("ibf size"),
277 &ibf_size),
278
263 GNUNET_GETOPT_OPTION_END 279 GNUNET_GETOPT_OPTION_END
264 }; 280 };
281
265 GNUNET_PROGRAM_run2 (argc, argv, "gnunet-consensus-ibf", 282 GNUNET_PROGRAM_run2 (argc, argv, "gnunet-consensus-ibf",
266 "help", 283 "help",
267 options, &run, NULL, GNUNET_YES); 284 options, &run, NULL, GNUNET_YES);