Regex profiler for testing distributed regex use. More...
#include "platform.h"
#include "gnunet_applications.h"
#include "gnunet_util_lib.h"
#include "regex_internal_lib.h"
#include "gnunet_arm_service.h"
#include "gnunet_dht_service.h"
#include "gnunet_testbed_service.h"
Go to the source code of this file.
Data Structures | |
struct | DLLOperation |
DLL of operations. More... | |
struct | RegexPeer |
Peer handles. More... | |
Macros | |
#define | FIND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 90) |
Enumerations | |
enum | State { STATE_INIT = 0 , STATE_SLAVES_STARTING , STATE_PEERS_CREATING , STATE_PEERS_STARTING , STATE_PEERS_LINKING , STATE_SEARCH_REGEX , STATE_PEERS_DESTROYING } |
Available states during profiling. More... | |
Functions | |
static void | dht_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg) |
DHT connect callback. More... | |
static void * | dht_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) |
DHT connect adapter. More... | |
static void | dht_da (void *cls, void *op_result) |
Adapter function called to destroy a connection to the DHT service. More... | |
static void | stats_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg) |
Function called by testbed once we are connected to stats service. More... | |
static void | announce_next_regex (void *cls) |
Start announcing the next regex in the DHT. More... | |
static void | do_shutdown (void *cls) |
Shutdown nicely. More... | |
static void | do_abort (void *cls) |
abort task to run on test timed out More... | |
static void * | stats_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Adapter function called to establish a connection to statistics service. More... | |
static void | stats_da (void *cls, void *op_result) |
Adapter function called to destroy a connection to statistics service. More... | |
static int | stats_iterator (void *cls, const char *subsystem, const char *name, uint64_t value, int is_persistent) |
Process statistic values. More... | |
static void | stats_cb (void *cls, int success) |
Stats callback. More... | |
static void | do_collect_stats (void *cls) |
Task to collect all statistics from all peers, will shutdown the profiler, when done. More... | |
static void | find_string (void *cls) |
Start searching for the next string in the DHT. More... | |
static void | regex_found_handler (void *cls, const struct GNUNET_PeerIdentity *id, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *put_path, unsigned int put_path_length) |
Method called when we've found a peer that announced a regex that matches our search string. More... | |
static void | search_timed_out (void *cls) |
Connect by string timeout task. More... | |
static void | find_timed_out (void *cls) |
Search timed out. More... | |
static void | daemon_started (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg) |
Callback called when testbed has started the daemon we asked for. More... | |
static void | do_announce (void *cls) |
Task to start the daemons on each peer so that the regexes are announced into the DHT. More... | |
static void | test_master (void *cls, struct GNUNET_TESTBED_RunHandle *h, unsigned int num_peers_, struct GNUNET_TESTBED_Peer **testbed_peers, unsigned int links_succeeded, unsigned int links_failed) |
Signature of a main function for a testcase. More... | |
static void | master_controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) |
Function that will be called whenever something in the testbed changes. More... | |
static int | count_and_separate_strings (char *data, uint64_t data_size, unsigned int str_max) |
Process the text buffer counting the non-empty lines and separating them with NULL characters, for later ease of copy using (as)printf. More... | |
static int | create_string_array (char *data, uint64_t data_size, char ***strings, unsigned int str_cnt) |
Allocate a string array and fill it with the prefixed strings from a pre-processed, NULL-separated memory region. More... | |
static int | load_search_strings (const char *filename, char ***strings, unsigned int limit) |
Load search strings from given filename. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *config) |
Main function that will be run by the scheduler. More... | |
int | main (int argc, char *const *argv) |
Main function. More... | |
Variables | |
static int | in_shutdown |
Set when shutting down to avoid making more queries. More... | |
static struct RegexPeer * | peers |
The array of peers; we fill this as the peers are given to us by the testbed. More... | |
static struct GNUNET_TESTBED_HostRegistrationHandle * | reg_handle |
Host registration handle. More... | |
static struct GNUNET_TESTBED_ControllerProc * | mc_proc |
Handle to the master controller process. More... | |
static struct GNUNET_TESTBED_Controller * | mc |
Handle to the master controller. More... | |
static struct GNUNET_CONFIGURATION_Handle * | cfg |
Handle to global configuration. More... | |
static struct GNUNET_SCHEDULER_Task * | abort_task |
Abort task identifier. More... | |
static struct GNUNET_SCHEDULER_Task * | register_hosts_task |
Host registration task identifier. More... | |
static uint64_t | event_mask |
Global event mask for all testbed events. More... | |
static struct GNUNET_TIME_Absolute | prof_start_time |
The starting time of a profiling step. More... | |
static struct GNUNET_TIME_Relative | prof_time |
Duration profiling step has taken. More... | |
static unsigned int | num_peers |
Number of peers to be started by the profiler. More... | |
static int | result |
Global testing status. More... | |
enum State | state |
current state of profiling More... | |
static char * | policy_dir |
Folder where policy files are stored. More... | |
static char * | hosts_file |
File with hostnames where to execute the test. More... | |
static char * | strings_file |
File with the strings to look for. More... | |
static char ** | search_strings |
Search strings (num_peers of them). More... | |
static long long unsigned int | init_parallel_searches |
How many searches are we going to start in parallel. More... | |
static unsigned int | parallel_searches |
How many searches are running in parallel. More... | |
static unsigned int | strings_found |
Number of strings found in the published regexes. More... | |
static unsigned int | next_search |
Index of peer to start next announce/search. More... | |
static struct GNUNET_SCHEDULER_Task * | search_timeout_task |
Search timeout task identifier. More... | |
static struct GNUNET_TIME_Relative | search_timeout_time = { 60000 } |
Search timeout in seconds. More... | |
static struct GNUNET_DISK_FileHandle * | data_file |
File to log statistics to. More... | |
static char * | data_filename |
Filename to log statistics to. More... | |
static char * | regex_prefix |
Prefix used for regex announcing. More... | |
static struct GNUNET_TIME_Relative | reannounce_period_max |
What's the maximum regex reannounce period. More... | |
Regex profiler for testing distributed regex use.
Definition in file gnunet-regex-profiler.c.
#define FIND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 90) |
Definition at line 35 of file gnunet-regex-profiler.c.
enum State |
Available states during profiling.
Definition at line 68 of file gnunet-regex-profiler.c.
|
static |
DHT connect callback.
Called when we are connected to the dht service for the peer in 'cls'. If successful we connect to the stats service of this peer and then try to match the search string of this peer.
cls | internal peer id. |
op | operation handle. |
ca_result | connect adapter result. |
emsg | error message. |
Definition at line 1028 of file gnunet-regex-profiler.c.
References RegexPeer::dht_handle, GNUNET_assert, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NO, GNUNET_TIME_absolute_get(), op, RegexPeer::op_handle, RegexPeer::prof_start_time, regex_found_handler(), REGEX_INTERNAL_search(), RegexPeer::search_handle, RegexPeer::search_str, and RegexPeer::search_str_matched.
Referenced by find_string().
|
static |
DHT connect adapter.
Opens a connection to the DHT service.
cls | Closure (peer). |
cfg | Configuration handle. |
Definition at line 1055 of file gnunet-regex-profiler.c.
References cfg, RegexPeer::dht_handle, and GNUNET_DHT_connect().
Referenced by find_string().
|
static |
Adapter function called to destroy a connection to the DHT service.
cls | Closure |
op_result | Service handle returned from the connect adapter. |
Definition at line 1066 of file gnunet-regex-profiler.c.
References RegexPeer::dht_handle, GNUNET_assert, GNUNET_DHT_disconnect(), REGEX_INTERNAL_search_cancel(), and RegexPeer::search_handle.
Referenced by find_string().
|
static |
Function called by testbed once we are connected to stats service.
Get the statistics for the services of interest.
cls | the 'struct RegexPeer' for which we connected to stats |
op | connect operation handle |
ca_result | handle to stats service |
emsg | error message on failure |
Definition at line 646 of file gnunet-regex-profiler.c.
References GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_STATISTICS_get(), RegexPeer::id, stats_cb(), RegexPeer::stats_handle, and stats_iterator().
Referenced by do_collect_stats(), and stats_cb().
|
static |
Start announcing the next regex in the DHT.
cls | Index of the next peer in the peers array. |
cls | Closure (unused). |
Definition at line 992 of file gnunet-regex-profiler.c.
References RegexPeer::daemon_op, daemon_started(), GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_cancel(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_MINUTES, GNUNET_YES, in_shutdown, next_search, num_peers, parallel_searches, RegexPeer::peer_handle, peers, search_timed_out(), search_timeout_task, and strings_found.
Referenced by do_announce(), find_timed_out(), and regex_found_handler().
|
static |
Shutdown nicely.
cls | NULL |
Definition at line 396 of file gnunet-regex-profiler.c.
References abort_task, cfg, data_file, GNUNET_CONFIGURATION_destroy(), GNUNET_DISK_file_close(), GNUNET_DISK_file_write(), GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_snprintf(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get_duration(), GNUNET_YES, RegexPeer::id, mc, mc_proc, num_peers, RegexPeer::op_handle, peers, RegexPeer::prof_start_time, prof_time, reg_handle, register_hosts_task, RegexPeer::search_str, RegexPeer::search_str_matched, search_strings, and size.
Referenced by do_abort(), and run().
|
static |
abort task to run on test timed out
cls | NULL |
Definition at line 483 of file gnunet-regex-profiler.c.
References abort_task, do_shutdown(), GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_SYSERR, and result.
Referenced by run().
|
static |
Adapter function called to establish a connection to statistics service.
cls | closure |
cfg | configuration of the peer to connect to; will be available until GNUNET_TESTBED_operation_done() is called on the operation returned from GNUNET_TESTBED_service_connect() |
Definition at line 510 of file gnunet-regex-profiler.c.
References cfg, and GNUNET_STATISTICS_create().
Referenced by do_collect_stats(), and stats_cb().
|
static |
Adapter function called to destroy a connection to statistics service.
cls | closure |
op_result | service handle returned from the connect adapter |
Definition at line 525 of file gnunet-regex-profiler.c.
References GNUNET_assert, GNUNET_NO, GNUNET_STATISTICS_destroy(), and RegexPeer::stats_handle.
Referenced by do_collect_stats(), and stats_cb().
|
static |
Process statistic values.
Write all values to global 'data_file', if present.
cls | closure |
subsystem | name of subsystem that created the statistic |
name | the name of the datum |
value | the current value |
is_persistent | GNUNET_YES if the value is persistent, GNUNET_NO if not |
Definition at line 547 of file gnunet-regex-profiler.c.
References data_file, GNUNET_DISK_file_write(), GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_OK, GNUNET_snprintf(), name, size, subsystem, and value.
Referenced by stats_connect_cb().
|
static |
Stats callback.
Finish the stats testbed operation and when all stats have been iterated, shutdown the profiler.
cls | closure |
success | GNUNET_OK if statistics were successfully obtained, GNUNET_SYSERR if not. |
Definition at line 591 of file gnunet-regex-profiler.c.
References GNUNET_assert, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_OK, GNUNET_SCHEDULER_shutdown(), RegexPeer::id, num_peers, RegexPeer::op_handle, RegexPeer::peer_handle, peers, result, stats_ca(), stats_connect_cb(), and stats_da().
Referenced by stats_connect_cb().
|
static |
Task to collect all statistics from all peers, will shutdown the profiler, when done.
cls | NULL |
Definition at line 682 of file gnunet-regex-profiler.c.
References GNUNET_assert, RegexPeer::op_handle, RegexPeer::peer_handle, peers, stats_ca(), stats_connect_cb(), and stats_da().
Referenced by regex_found_handler(), and search_timed_out().
|
static |
Start searching for the next string in the DHT.
Start searching for a string in the DHT.
cls | Index of the next peer in the peers array. |
Definition at line 881 of file gnunet-regex-profiler.c.
References dht_ca(), dht_connect_cb(), dht_da(), find_timed_out(), FIND_TIMEOUT, GNUNET_assert, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_SCHEDULER_add_delayed(), GNUNET_YES, in_shutdown, consensus-simulation::int, num_peers, RegexPeer::op_handle, parallel_searches, RegexPeer::peer_handle, peers, RegexPeer::search_str, and RegexPeer::timeout.
Referenced by daemon_started().
|
static |
Method called when we've found a peer that announced a regex that matches our search string.
Now get the statistics.
cls | Closure provided in REGEX_INTERNAL_search. |
id | Peer providing a regex that matches the string. |
get_path | Path of the get request. |
get_path_length | Length of get_path. |
put_path | Path of the put request. |
put_path_length | Length of the put_path. |
Definition at line 726 of file gnunet-regex-profiler.c.
References announce_next_regex(), data_file, do_collect_stats(), GNUNET_DISK_file_write(), GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_cancel(), GNUNET_snprintf(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_TIME_absolute_get_duration(), GNUNET_YES, RegexPeer::id, in_shutdown, num_peers, RegexPeer::op_handle, parallel_searches, RegexPeer::prof_start_time, prof_start_time, prof_time, RegexPeer::search_str, RegexPeer::search_str_matched, search_timeout_task, size, strings_found, and RegexPeer::timeout.
Referenced by dht_connect_cb().
|
static |
Connect by string timeout task.
This will cancel the profiler after the specified timeout 'search_timeout'.
cls | NULL |
Definition at line 824 of file gnunet-regex-profiler.c.
References do_collect_stats(), GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_YES, in_shutdown, num_peers, RegexPeer::op_handle, peers, search_timeout_time, and strings_found.
Referenced by announce_next_regex(), and test_master().
|
static |
Search timed out.
It might still complete in the future, but we should start another one.
cls | Index of the next peer in the peers array. |
Definition at line 861 of file gnunet-regex-profiler.c.
References announce_next_regex(), GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_add_now(), in_shutdown, and p.
Referenced by find_string().
|
static |
Callback called when testbed has started the daemon we asked for.
cls | NULL |
op | the operation handle |
emsg | NULL on success; otherwise an error description |
Definition at line 920 of file gnunet-regex-profiler.c.
References RegexPeer::daemon_op, find_string(), GNUNET_assert, GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_CRYPTO_random_u32(), GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_relative_saturating_multiply(), RegexPeer::id, num_peers, peers, reannounce_period_max, RegexPeer::search_str, RegexPeer::search_str_matched, and search_strings.
Referenced by announce_next_regex().
|
static |
Task to start the daemons on each peer so that the regexes are announced into the DHT.
cls | NULL |
Definition at line 968 of file gnunet-regex-profiler.c.
References announce_next_regex(), GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_SCHEDULER_add_now(), GNUNET_YES, in_shutdown, and init_parallel_searches.
Referenced by test_master().
|
static |
Signature of a main function for a testcase.
cls | NULL |
h | the run handle |
num_peers_ | number of peers in 'peers' |
testbed_peers | handle to peers run in the testbed. NULL upon timeout (see GNUNET_TESTBED_test_run()). |
links_succeeded | the number of overlay link connection attempts that succeeded |
links_failed | the number of overlay link connection attempts that failed |
Definition at line 1100 of file gnunet-regex-profiler.c.
References abort_task, cfg, do_announce(), GNUNET_assert, GNUNET_CONFIGURATION_get_value_yesno(), GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_cancel(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get_duration(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_MILLISECONDS, num_peers, RegexPeer::peer_handle, peers, prof_start_time, prof_time, search_timed_out(), search_timeout_task, and search_timeout_time.
Referenced by run().
|
static |
Function that will be called whenever something in the testbed changes.
cls | closure, NULL |
event | information on what is happening |
Definition at line 1156 of file gnunet-regex-profiler.c.
Referenced by run().
|
static |
Process the text buffer counting the non-empty lines and separating them with NULL characters, for later ease of copy using (as)printf.
data | Memory buffer with strings. |
data_size | Size of the data buffer in bytes. |
str_max | Maximum number of strings to return. |
Definition at line 1191 of file gnunet-regex-profiler.c.
References data, and data_size.
Referenced by load_search_strings().
|
static |
Allocate a string array and fill it with the prefixed strings from a pre-processed, NULL-separated memory region.
data | Preprocessed memory with strings |
data_size | Size of the data buffer in bytes. |
strings | Address of the string array to be created. Must be freed by caller if function end in success. |
str_cnt | String count. The data buffer should contain at least this many NULL-separated strings. |
Definition at line 1234 of file gnunet-regex-profiler.c.
References data, data_size, GNUNET_asprintf(), GNUNET_free, GNUNET_malloc, GNUNET_OK, GNUNET_SYSERR, and regex_prefix.
Referenced by load_search_strings().
|
static |
Load search strings from given filename.
One search string per line.
filename | filename of the file containing the search strings. |
strings | set of strings loaded from file. Caller needs to free this if number returned is greater than zero. |
limit | upper limit on the number of strings read from the file |
Definition at line 1279 of file gnunet-regex-profiler.c.
References count_and_separate_strings(), create_string_array(), data, filename, GNUNET_DISK_file_size(), GNUNET_DISK_file_test(), GNUNET_DISK_fn_read(), GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_log, GNUNET_malloc, GNUNET_OK, GNUNET_SYSERR, and GNUNET_YES.
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
config | configuration |
Definition at line 1350 of file gnunet-regex-profiler.c.
References _, abort_task, cfg, config, data_file, data_filename, do_abort(), do_shutdown(), event_mask, GNUNET_CONFIGURATION_dup(), GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONFIGURATION_set_value_number(), GNUNET_CONFIGURATION_set_value_string(), GNUNET_DISK_directory_scan(), GNUNET_DISK_directory_test(), GNUNET_DISK_file_open(), GNUNET_DISK_file_test(), GNUNET_DISK_OPEN_CREATE, GNUNET_DISK_OPEN_READWRITE, GNUNET_DISK_OPEN_TRUNCATE, GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_log_config_missing(), GNUNET_log_strerror_file, GNUNET_malloc, GNUNET_NO, GNUNET_OK, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_TIME_relative_add(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_MINUTES, GNUNET_YES, hosts_file, in_shutdown, init_parallel_searches, load_search_strings(), master_controller_cb(), num_peers, peers, policy_dir, prof_start_time, reannounce_period_max, regex_prefix, search_strings, strings_file, and test_master().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
Main function.
argc | argument count |
argv | argument values |
Definition at line 1531 of file gnunet-regex-profiler.c.
References _, data_filename, gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_filename(), GNUNET_GETOPT_option_relative_time(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_SYSERR, hosts_file, options, policy_dir, result, ret, run(), search_timeout_time, and strings_file.
|
static |
Set when shutting down to avoid making more queries.
Definition at line 180 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex(), do_announce(), find_string(), find_timed_out(), regex_found_handler(), run(), and search_timed_out().
|
static |
The array of peers; we fill this as the peers are given to us by the testbed.
Definition at line 185 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex(), daemon_started(), do_collect_stats(), do_shutdown(), find_string(), run(), search_timed_out(), stats_cb(), and test_master().
|
static |
Host registration handle.
Definition at line 190 of file gnunet-regex-profiler.c.
Referenced by do_shutdown().
|
static |
Handle to the master controller process.
Definition at line 195 of file gnunet-regex-profiler.c.
Referenced by do_shutdown().
|
static |
Handle to the master controller.
Definition at line 200 of file gnunet-regex-profiler.c.
Referenced by disconnect(), do_shutdown(), error_handler(), GNUNET_CRYPTO_hmac_raw(), GNUNET_PEERSTORE_monitor_start(), GNUNET_PROGRAM_monolith_main(), GNUNET_TRANSPORT_monitor(), GNUNET_TRANSPORT_monitor_cancel(), handle_monitor_data(), handle_monitor_end(), handle_monitor_next(), handle_monitor_start(), handle_result(), handle_sync(), monitor_iterate_cb(), monitor_iteration_next(), monitor_sync(), monolith_main(), mq_error_handler(), reconnect(), send_start_monitor(), and watch_notifier().
|
static |
Handle to global configuration.
Definition at line 205 of file gnunet-regex-profiler.c.
Referenced by dht_ca(), do_shutdown(), run(), stats_ca(), and test_master().
|
static |
Abort task identifier.
Definition at line 210 of file gnunet-regex-profiler.c.
Referenced by do_abort(), do_shutdown(), run(), and test_master().
|
static |
Host registration task identifier.
Definition at line 215 of file gnunet-regex-profiler.c.
Referenced by do_shutdown().
|
static |
Global event mask for all testbed events.
Definition at line 220 of file gnunet-regex-profiler.c.
Referenced by run().
|
static |
The starting time of a profiling step.
Definition at line 225 of file gnunet-regex-profiler.c.
Referenced by regex_found_handler(), run(), and test_master().
|
static |
Duration profiling step has taken.
Definition at line 230 of file gnunet-regex-profiler.c.
Referenced by do_shutdown(), regex_found_handler(), and test_master().
|
static |
Number of peers to be started by the profiler.
Definition at line 235 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex(), daemon_started(), do_shutdown(), find_string(), regex_found_handler(), run(), search_timed_out(), stats_cb(), and test_master().
|
static |
Global testing status.
Definition at line 240 of file gnunet-regex-profiler.c.
Referenced by _nss_gns_gethostbyaddr_r(), _nss_gns_gethostbyname2_r(), _nss_gns_gethostbyname_r(), auto_config_cb(), block_create2(), check_proof_of_work(), check_search_response(), clear_msg(), close_srv_handle_room(), convert_from_ed_to_curve(), create_internal(), database_shutdown(), decode_message(), decode_private_ecdsa_key(), decrypt_message(), dns_value_to_string(), do_abort(), do_reconnect(), ecdsa_symmetric_decrypt(), ecdsa_symmetric_encrypt(), eddsa_symmetric_decrypt(), eddsa_symmetric_encrypt(), ego_sign_data_cb(), elligator_direct_map(), encrypt_message(), evaluate_nfa(), expand_dollar(), extract_abs_time(), extract_abs_time_nbo(), extract_array_generic(), extract_blind_sign_priv(), extract_blind_sign_pub(), extract_bool(), extract_fixed_blob(), extract_int64(), extract_rel_time(), extract_result_cb(), extract_rsa_pub(), extract_rsa_public_key(), extract_rsa_sig(), extract_rsa_signature(), extract_string(), extract_timestamp(), extract_timestamp_nbo(), extract_uint16(), extract_uint32(), extract_uint64(), extract_utf8_string(), extract_var_blob(), extract_varsize_blob(), find_linked_hash(), find_op_by_id(), find_proof(), GCC_latency_observed(), get_cont(), get_service_peer_identity(), GNUNET_BIO_read(), GNUNET_BIO_read_spec_object(), GNUNET_BIO_read_spec_string(), GNUNET_BIO_read_string(), GNUNET_CRYPTO_ecdhe_elligator_encoding(), GNUNET_CRYPTO_ecdsa_public_key_derive(), GNUNET_CRYPTO_eddsa_private_key_derive(), GNUNET_CRYPTO_eddsa_public_key_derive(), GNUNET_CRYPTO_edx25519_private_key_derive(), GNUNET_CRYPTO_edx25519_public_key_derive(), GNUNET_CRYPTO_hash_create_random(), GNUNET_CRYPTO_hash_difference(), GNUNET_CRYPTO_hash_from_string2(), GNUNET_CRYPTO_hash_sum(), GNUNET_CRYPTO_hash_to_enc(), GNUNET_CRYPTO_hash_xor(), GNUNET_CRYPTO_hkdf_expand(), GNUNET_CRYPTO_hkdf_expand_v(), GNUNET_CRYPTO_hkdf_gnunet(), GNUNET_CRYPTO_hkdf_gnunet_v(), GNUNET_CRYPTO_kdf(), GNUNET_CRYPTO_kdf_v(), GNUNET_CRYPTO_mpi_scan_unsigned(), GNUNET_CRYPTO_paillier_hom_add(), GNUNET_CRYPTO_pow_hash(), GNUNET_CRYPTO_rsa_private_key_get_public(), GNUNET_CRYPTO_sign_by_peer_identity(), GNUNET_CRYPTO_symmetric_decrypt(), GNUNET_CRYPTO_symmetric_encrypt(), GNUNET_DISK_file_read(), GNUNET_DISK_fn_read(), GNUNET_FS_directory_scan_get_result(), GNUNET_FS_read_meta_data(), GNUNET_FS_read_spec_meta_data(), GNUNET_GNSRECORD_block_create(), GNUNET_GNSRECORD_block_create2(), GNUNET_GNSRECORD_block_create_unsigned(), GNUNET_GNSRECORD_check_pow(), GNUNET_GNSRECORD_pow_round(), GNUNET_HELLO_builder_to_url2(), GNUNET_HELLO_parser_to_url(), GNUNET_HELLO_sign_address(), GNUNET_HOSTLIST_client_start(), GNUNET_PQ_eval_prepared_multi_select(), GNUNET_PQ_eval_prepared_non_select(), GNUNET_PQ_eval_prepared_singleton_select(), GNUNET_PQ_eval_result(), GNUNET_PQ_event_notify(), GNUNET_PQ_exec_statements(), GNUNET_PQ_extract_result(), GNUNET_RECLAIM_attribute_list_dup(), GNUNET_RECLAIM_attribute_list_serialize(), GNUNET_RECLAIM_attribute_serialize(), GNUNET_RECLAIM_credential_list_dup(), GNUNET_RECLAIM_credential_list_serialize(), GNUNET_RECLAIM_credential_serialize(), GNUNET_RECLAIM_presentation_list_dup(), GNUNET_RECLAIM_presentation_list_serialize(), GNUNET_RECLAIM_presentation_serialize(), GNUNET_SETI_create(), GNUNET_SETU_create(), GNUNET_SQ_extract_result(), GNUNET_STRINGS_parse_ipv4_policy(), GNUNET_STRINGS_parse_ipv6_policy(), GNUNET_try_compression(), GNUNET_xmalloc_unchecked_(), GSF_consider_forwarding(), GSF_request_plan_reference_get_last_transmission_(), handle_arm_result(), handle_external_ip(), handle_gns_response(), handle_results(), handle_search_response(), handle_search_result(), hkdf_expand(), init_callback(), init_cb(), ip_try_connect(), libgnunet_plugin_datacache_sqlite_done(), link_room_message(), main(), manage_subscribe(), numeric_reverse(), OIDC_generate_id_token_hmac(), OIDC_generate_id_token_rsa(), open_service_room(), process_keys(), process_result_message(), read_from_buffer(), read_from_file(), read_spec_handler_int32(), read_spec_handler_int64(), read_spec_handler_meta_data(), read_spec_handler_string(), recalculate_path_desirability(), reconnect(), REGEX_INTERNAL_eval(), regex_next_edge(), regex_result_iterator(), request_room_message_step(), request_srv_room_message(), requester_callback(), ret_string(), rsa_sign_mpi(), send_finished(), sign_pow_identity(), signal_result(), sq_prepare(), sql_exec(), sql_prepare(), start_callback(), start_p2p_processing(), state_set_compare(), stats_cb(), stop_callback(), stop_cb(), stun_msg2str(), term_callback(), test_report_cb(), time_between(), and upnp_addr_change_cb().
enum State state |
current state of profiling
Definition at line 245 of file gnunet-regex-profiler.c.
Referenced by check_icmp_remote(), check_icmp_service(), check_tcp_data(), check_tcp_remote(), check_tcp_service(), check_udp_remote(), check_udp_service(), cleanup_s5r(), clear_message_state(), deserialize_unindex_file(), GCT_change_estate(), get_message_state_chain_hash(), get_message_state_merge_hash(), get_redirect_state(), handle_icmp_remote(), handle_icmp_service(), handle_tcp_data(), handle_tcp_remote(), handle_tcp_service(), handle_udp_remote(), handle_udp_service(), icmp_from_helper(), init_message_state(), intersection_accept(), intersection_evaluate(), iterate_initial_edge(), iterate_reachables(), load_message_state(), make_up_icmp_service_payload(), make_up_icmpv4_payload(), make_up_icmpv6_payload(), mark_as_reachable(), monitor_cb(), parse_definitions(), print_info(), print_plugin_event_info(), process_peer_iteration_cb(), process_peer_monitoring_cb(), reachability_iterator(), resolve_peer_address(), save_message_state(), setup_state_record(), state_remove_transition(), state_set_append(), tcp_from_helper(), udp_from_helper(), union_accept(), union_copy_state(), union_evaluate(), and update_message_state().
|
static |
Folder where policy files are stored.
Definition at line 250 of file gnunet-regex-profiler.c.
|
static |
File with hostnames where to execute the test.
Definition at line 255 of file gnunet-regex-profiler.c.
|
static |
File with the strings to look for.
Definition at line 260 of file gnunet-regex-profiler.c.
|
static |
Search strings (num_peers of them).
Definition at line 265 of file gnunet-regex-profiler.c.
Referenced by daemon_started(), do_shutdown(), and run().
|
static |
How many searches are we going to start in parallel.
Definition at line 270 of file gnunet-regex-profiler.c.
Referenced by do_announce(), and run().
|
static |
How many searches are running in parallel.
Definition at line 275 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex(), find_string(), and regex_found_handler().
|
static |
Number of strings found in the published regexes.
Definition at line 280 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex(), regex_found_handler(), and search_timed_out().
|
static |
Index of peer to start next announce/search.
Definition at line 285 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex().
|
static |
Search timeout task identifier.
Definition at line 290 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex(), regex_found_handler(), and test_master().
|
static |
Search timeout in seconds.
Definition at line 295 of file gnunet-regex-profiler.c.
Referenced by main(), search_timed_out(), and test_master().
|
static |
File to log statistics to.
Definition at line 300 of file gnunet-regex-profiler.c.
Referenced by do_shutdown(), regex_found_handler(), run(), and stats_iterator().
|
static |
Filename to log statistics to.
Definition at line 305 of file gnunet-regex-profiler.c.
|
static |
Prefix used for regex announcing.
We need to prefix the search strings with it, in order to find something.
Definition at line 311 of file gnunet-regex-profiler.c.
Referenced by create_string_array(), and run().
|
static |
What's the maximum regex reannounce period.
Definition at line 316 of file gnunet-regex-profiler.c.
Referenced by daemon_started(), and run().