diff options
Diffstat (limited to 'src/regex/gnunet-regex-profiler.c')
-rw-r--r-- | src/regex/gnunet-regex-profiler.c | 83 |
1 files changed, 41 insertions, 42 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index bd223ae8e..75a1d2f99 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -23,11 +23,7 @@ | |||
23 | * @brief Regex profiler for testing distributed regex use. | 23 | * @brief Regex profiler for testing distributed regex use. |
24 | * @author Bartlomiej Polot | 24 | * @author Bartlomiej Polot |
25 | * @author Maximilian Szengel | 25 | * @author Maximilian Szengel |
26 | * | ||
27 | */ | 26 | */ |
28 | |||
29 | #include <string.h> | ||
30 | |||
31 | #include "platform.h" | 27 | #include "platform.h" |
32 | #include "gnunet_applications.h" | 28 | #include "gnunet_applications.h" |
33 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
@@ -727,9 +723,9 @@ find_string (void *cls); | |||
727 | static void | 723 | static void |
728 | regex_found_handler (void *cls, | 724 | regex_found_handler (void *cls, |
729 | const struct GNUNET_PeerIdentity *id, | 725 | const struct GNUNET_PeerIdentity *id, |
730 | const struct GNUNET_PeerIdentity *get_path, | 726 | const struct GNUNET_DHT_PathElement *get_path, |
731 | unsigned int get_path_length, | 727 | unsigned int get_path_length, |
732 | const struct GNUNET_PeerIdentity *put_path, | 728 | const struct GNUNET_DHT_PathElement *put_path, |
733 | unsigned int put_path_length) | 729 | unsigned int put_path_length) |
734 | { | 730 | { |
735 | struct RegexPeer *peer = cls; | 731 | struct RegexPeer *peer = cls; |
@@ -1558,53 +1554,56 @@ int | |||
1558 | main (int argc, char *const *argv) | 1554 | main (int argc, char *const *argv) |
1559 | { | 1555 | { |
1560 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1556 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1561 | GNUNET_GETOPT_option_filename ('o', | 1557 | GNUNET_GETOPT_option_filename ( |
1562 | "output-file", | 1558 | 'o', |
1563 | "FILENAME", | 1559 | "output-file", |
1564 | gettext_noop ( | 1560 | "FILENAME", |
1565 | "name of the file for writing statistics"), | 1561 | gettext_noop ( |
1566 | &data_filename), | 1562 | "name of the file for writing statistics"), |
1567 | 1563 | &data_filename), | |
1568 | GNUNET_GETOPT_option_relative_time ('t', | 1564 | GNUNET_GETOPT_option_relative_time ( |
1569 | "matching-timeout", | 1565 | 't', |
1570 | "TIMEOUT", | 1566 | "matching-timeout", |
1571 | gettext_noop ( | 1567 | "TIMEOUT", |
1572 | "wait TIMEOUT before ending the experiment"), | 1568 | gettext_noop ( |
1573 | &search_timeout_time), | 1569 | "wait TIMEOUT before ending the experiment"), |
1574 | 1570 | &search_timeout_time), | |
1575 | GNUNET_GETOPT_option_filename ('p', | 1571 | GNUNET_GETOPT_option_filename ( |
1576 | "policy-dir", | 1572 | 'p', |
1577 | "DIRECTORY", | 1573 | "policy-dir", |
1578 | gettext_noop ("directory with policy files"), | 1574 | "DIRECTORY", |
1579 | &policy_dir), | 1575 | gettext_noop ("directory with policy files"), |
1580 | 1576 | &policy_dir), | |
1581 | 1577 | GNUNET_GETOPT_option_filename ( | |
1582 | GNUNET_GETOPT_option_filename ('s', | 1578 | 's', |
1583 | "strings-file", | 1579 | "strings-file", |
1584 | "FILENAME", | 1580 | "FILENAME", |
1585 | gettext_noop ( | 1581 | gettext_noop ( |
1586 | "name of file with input strings"), | 1582 | "name of file with input strings"), |
1587 | &strings_file), | 1583 | &strings_file), |
1588 | 1584 | GNUNET_GETOPT_option_filename ( | |
1589 | GNUNET_GETOPT_option_filename ('H', | 1585 | 'H', |
1590 | "hosts-file", | 1586 | "hosts-file", |
1591 | "FILENAME", | 1587 | "FILENAME", |
1592 | gettext_noop ( | 1588 | gettext_noop ( |
1593 | "name of file with hosts' names"), | 1589 | "name of file with hosts' names"), |
1594 | &hosts_file), | 1590 | &hosts_file), |
1595 | 1591 | ||
1596 | GNUNET_GETOPT_OPTION_END | 1592 | GNUNET_GETOPT_OPTION_END |
1597 | }; | 1593 | }; |
1598 | int ret; | 1594 | int ret; |
1599 | 1595 | ||
1600 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 1596 | if (GNUNET_OK != |
1597 | GNUNET_STRINGS_get_utf8_args (argc, argv, | ||
1598 | &argc, &argv)) | ||
1601 | return 2; | 1599 | return 2; |
1602 | result = GNUNET_SYSERR; | 1600 | result = GNUNET_SYSERR; |
1603 | ret = | 1601 | ret = |
1604 | GNUNET_PROGRAM_run (argc, argv, | 1602 | GNUNET_PROGRAM_run (argc, argv, |
1605 | "gnunet-regex-profiler", | 1603 | "gnunet-regex-profiler", |
1606 | _ ("Profiler for regex"), | 1604 | _ ("Profiler for regex"), |
1607 | options, &run, NULL); | 1605 | options, |
1606 | &run, NULL); | ||
1608 | if (GNUNET_OK != ret) | 1607 | if (GNUNET_OK != ret) |
1609 | return ret; | 1608 | return ret; |
1610 | if (GNUNET_OK != result) | 1609 | if (GNUNET_OK != result) |