![]() |
GNUnet
0.11.x
|
Regex profiler for testing distributed regex use. More...
#include <string.h>
#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, INIT, CFG_REQUEST_QUEUED, SERVICE_CONNECTED, RC_INIT = 0, RC_LINKED, RC_PEERS_CREATED, RC_READY, RC_PEERS_SHUTDOWN } |
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_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *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 39 of file gnunet-regex-profiler.c.
Referenced by find_string().
enum State |
Available states during profiling.
Definition at line 72 of file gnunet-regex-profiler.c.
|
static |
DHT connect callback.
cls | internal peer id. |
op | operation handle. |
ca_result | connect adapter result. |
emsg | error message. |
Called when we are connected to the dht service for the peer in 'cls'. If successfull 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 1039 of file gnunet-regex-profiler.c.
References RegexPeer::dht_handle, GNUNET_assert, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NO, GNUNET_TIME_absolute_get(), DLLOperation::op, RegexPeer::op_handle, peer, 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.
cls | not used. |
cfg | configuration handle. |
Opens a connection to the dht service.
cls | Closure (peer). |
cfg | Configuration handle. |
Definition at line 1074 of file gnunet-regex-profiler.c.
References DLLOperation::cls, RegexPeer::dht_handle, GNUNET_DHT_connect(), and peer.
Referenced by find_string().
|
static |
Adapter function called to destroy a connection to the DHT service.
Adapter function called to destroy a connection to the dht service.
cls | closure |
op_result | service handle returned from the connect adapter |
cls | Closure (peer). |
op_result | Service handle returned from the connect adapter. |
Definition at line 1091 of file gnunet-regex-profiler.c.
References RegexPeer::dht_handle, GNUNET_assert, GNUNET_DHT_disconnect(), peer, 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 DLLOperation::cls, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_STATISTICS_get(), RegexPeer::id, peer, 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 993 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_TESTBED_peer_manage_service(), GNUNET_TIME_relative_multiply(), GNUNET_TIME_UNIT_MINUTES, GNUNET_YES, in_shutdown, next_search, num_peers, parallel_searches, peer, RegexPeer::peer_handle, search_timed_out(), and strings_found.
Referenced by do_announce(), find_timed_out(), and regex_found_handler().
|
static |
Shutdown nicely.
cls | NULL |
Definition at line 398 of file gnunet-regex-profiler.c.
References 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_TESTBED_cancel_registration(), GNUNET_TESTBED_controller_disconnect(), GNUNET_TESTBED_controller_stop(), GNUNET_TESTBED_operation_done(), GNUNET_TIME_absolute_get_duration(), GNUNET_YES, RegexPeer::id, num_peers, RegexPeer::op_handle, peer, RegexPeer::prof_start_time, prof_time, 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 485 of file gnunet-regex-profiler.c.
References 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 512 of file gnunet-regex-profiler.c.
References 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 527 of file gnunet-regex-profiler.c.
References DLLOperation::cls, GNUNET_assert, GNUNET_NO, GNUNET_STATISTICS_destroy(), peer, 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 549 of file gnunet-regex-profiler.c.
References DLLOperation::cls, GNUNET_DISK_file_write(), GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_OK, GNUNET_snprintf(), peer, and size.
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 DLLOperation::cls, GNUNET_assert, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_OK, GNUNET_SCHEDULER_shutdown(), GNUNET_TESTBED_operation_done(), GNUNET_TESTBED_service_connect(), RegexPeer::id, num_peers, RegexPeer::op_handle, peer, RegexPeer::peer_handle, 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 DLLOperation::cls, find_string(), GNUNET_assert, GNUNET_TESTBED_service_connect(), RegexPeer::op_handle, peer, RegexPeer::peer_handle, 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 DLLOperation::cls, 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_TESTBED_service_connect(), GNUNET_YES, in_shutdown, num_peers, RegexPeer::op_handle, parallel_searches, RegexPeer::peer_handle, RegexPeer::search_str, and RegexPeer::timeout.
Referenced by daemon_started(), and do_collect_stats().
|
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 | Lenght 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(), DLLOperation::cls, 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_TESTBED_operation_done(), GNUNET_TIME_absolute_get_duration(), GNUNET_YES, RegexPeer::id, in_shutdown, num_peers, RegexPeer::op_handle, parallel_searches, peer, RegexPeer::prof_start_time, prof_start_time, prof_time, RegexPeer::search_str, RegexPeer::search_str_matched, 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_TESTBED_operation_done(), GNUNET_YES, in_shutdown, num_peers, RegexPeer::op_handle, 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(), DLLOperation::cls, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_add_now(), RegexPeer::id, in_shutdown, p, RegexPeer::search_str, and RegexPeer::timeout.
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_TESTBED_operation_done(), GNUNET_TIME_relative_saturating_multiply(), RegexPeer::id, num_peers, peer, 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 |
tc | the task context |
Definition at line 969 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 1125 of file gnunet-regex-profiler.c.
References 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, prof_start_time, prof_time, and search_timed_out().
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 1181 of file gnunet-regex-profiler.c.
References GNUNET_TESTBED_ET_CONNECT, GNUNET_TESTBED_ET_PEER_START, and GNUNET_TESTBED_EventInformation::type.
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 1216 of file gnunet-regex-profiler.c.
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 1259 of file gnunet-regex-profiler.c.
References GNUNET_asprintf(), GNUNET_free, GNUNET_malloc, GNUNET_OK, GNUNET_SYSERR, len, 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 1304 of file gnunet-regex-profiler.c.
References count_and_separate_strings(), create_string_array(), data, 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 1375 of file gnunet-regex-profiler.c.
References _, 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_TESTBED_ET_CONNECT, GNUNET_TESTBED_ET_PEER_START, GNUNET_TESTBED_run(), 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, 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 1556 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_STRINGS_get_utf8_args(), GNUNET_SYSERR, hosts_file, policy_dir, result, ret, run(), and strings_file.
|
static |
Set when shutting down to avoid making more queries.
Definition at line 184 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 189 of file gnunet-regex-profiler.c.
|
static |
Host registration handle.
Definition at line 194 of file gnunet-regex-profiler.c.
|
static |
Handle to the master controller process.
Definition at line 199 of file gnunet-regex-profiler.c.
|
static |
Handle to the master controller.
Definition at line 204 of file gnunet-regex-profiler.c.
Referenced by broadcast_mst_cb(), copy_latest(), error_handler(), estimate_latency(), GNUNET_CRYPTO_hmac_raw(), GNUNET_DEFRAGMENT_context_destroy(), GNUNET_DEFRAGMENT_process_fragment(), GNUNET_MYSQL_context_create(), GNUNET_MYSQL_statement_prepare(), GNUNET_TRANSPORT_monitor(), handle_monitor_data(), handle_monitor_end(), merge_addr(), prepare_statement(), and send_ack().
|
static |
Handle to global configuration.
Definition at line 209 of file gnunet-regex-profiler.c.
|
static |
Abort task identifier.
Definition at line 214 of file gnunet-regex-profiler.c.
|
static |
Host registration task identifier.
Definition at line 219 of file gnunet-regex-profiler.c.
|
static |
Global event mask for all testbed events.
Definition at line 224 of file gnunet-regex-profiler.c.
Referenced by run().
|
static |
The starting time of a profiling step.
Definition at line 229 of file gnunet-regex-profiler.c.
Referenced by regex_found_handler(), run(), and test_master().
|
static |
Duration profiling step has taken.
Definition at line 234 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 239 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 244 of file gnunet-regex-profiler.c.
Referenced by block_plugin_regex_evaluate(), check_reply(), check_tunnel_message(), create_internal(), database_shutdown(), decode_private_ecdsa_key(), dns_value_to_string(), do_abort(), do_reconnect(), evaluate_nfa(), expand_dollar(), find_op_by_id(), GAS_handle_reservation_request(), GCC_latency_observed(), get_cont(), GNUNET_BIO_read(), GNUNET_BIO_read_spec_meta_data(), GNUNET_BIO_read_spec_object(), GNUNET_BIO_read_spec_string(), GNUNET_CRYPTO_rsa_private_key_get_public(), GNUNET_FS_directory_scan_get_result(), GNUNET_HOSTLIST_client_start(), GNUNET_MY_extract_result(), GNUNET_PQ_eval_prepared_multi_select(), GNUNET_PQ_eval_prepared_non_select(), GNUNET_PQ_eval_prepared_singleton_select(), GNUNET_PQ_exec_statements(), GNUNET_RECLAIM_attribute_list_dup(), GNUNET_RECLAIM_attribute_list_serialize(), GNUNET_RECLAIM_credential_list_dup(), GNUNET_RECLAIM_credential_list_serialize(), GNUNET_RECLAIM_presentation_list_dup(), GNUNET_RECLAIM_presentation_list_serialize(), GNUNET_SETI_create(), GNUNET_SETU_create(), GNUNET_STRINGS_parse_ipv4_policy(), GNUNET_STRINGS_parse_ipv6_policy(), GNUNET_xmalloc_unchecked_(), handle_arm_result(), handle_gns_response(), handle_reply(), handle_search_result(), init_cb(), libgnunet_plugin_datacache_sqlite_done(), main(), numeric_reverse(), OIDC_generate_id_token(), process_result_message(), 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(), rsa_sign_mpi(), send_with_session(), set_handle_name(), sign_pow_identity(), sq_prepare(), sql_exec(), sql_prepare(), state_set_compare(), stats_cb(), stun_msg2str(), time_between(), and write_cpabe().
enum State state |
current state of profiling
Definition at line 249 of file gnunet-regex-profiler.c.
Referenced by change_state(), check_icmp_remote(), check_icmp_service(), check_tcp_data(), check_tcp_remote(), check_tcp_service(), check_udp_remote(), check_udp_service(), cleanup_s5r(), deserialize_unindex_file(), GCT_change_estate(), gen_topo_from_file(), get_redirect_state(), handle_dummy(), handle_icmp_remote(), handle_icmp_service(), handle_tcp_data(), handle_tcp_remote(), handle_tcp_service(), handle_udp_remote(), handle_udp_service(), icmp_from_helper(), intersection_accept(), intersection_evaluate(), iterate_reachables(), notify_session_monitor(), parse_definitions(), print_plugin_event_info(), process_peer_monitoring_cb(), reachability_iterator(), resolve_peer_address(), state_set_append(), tcp_from_helper(), udp_from_helper(), union_accept(), union_evaluate(), and validation_entry_changed().
|
static |
Folder where policy files are stored.
Definition at line 254 of file gnunet-regex-profiler.c.
|
static |
File with hostnames where to execute the test.
Definition at line 259 of file gnunet-regex-profiler.c.
|
static |
File with the strings to look for.
Definition at line 264 of file gnunet-regex-profiler.c.
|
static |
Search strings (num_peers of them).
Definition at line 269 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 274 of file gnunet-regex-profiler.c.
Referenced by do_announce(), and run().
|
static |
How many searches are running in parallel.
Definition at line 279 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 284 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 289 of file gnunet-regex-profiler.c.
Referenced by announce_next_regex().
|
static |
Search timeout task identifier.
Definition at line 294 of file gnunet-regex-profiler.c.
|
static |
Search timeout in seconds.
Definition at line 299 of file gnunet-regex-profiler.c.
|
static |
File to log statistics to.
Definition at line 304 of file gnunet-regex-profiler.c.
|
static |
Filename to log statistics to.
Definition at line 309 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 315 of file gnunet-regex-profiler.c.
Referenced by create_string_array(), and run().
|
static |
What's the maximum regex reannounce period.
Definition at line 320 of file gnunet-regex-profiler.c.
Referenced by daemon_started(), and run().