![]() |
GNUnet
0.11.x
|
ats testing library: setup topology and provide logging to test ats More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testbed_service.h"
#include "gnunet_ats_service.h"
#include "gnunet_core_service.h"
#include "gnunet_transport_service.h"
Go to the source code of this file.
Data Structures | |
struct | TestMessage |
struct | BenchmarkPeer |
Information we track for a peer in the testbed. More... | |
struct | TrafficGenerator |
struct | PreferenceGenerator |
struct | BenchmarkPartner |
Information about a benchmarking partner. More... | |
struct | BenchmarkState |
Overall state of the performance benchmark. More... | |
struct | GNUNET_ATS_TEST_Topology |
struct | GNUNET_ATS_TEST_Operation |
An operation in an experiment. More... | |
struct | Episode |
struct | Experiment |
Macros | |
#define | TEST_ATS_PREFERENCE_DEFAULT 1.0 |
#define | TEST_MESSAGE_TYPE_PING 12345 |
Message type sent for traffic generation. More... | |
#define | TEST_MESSAGE_TYPE_PONG 12346 |
Message type sent as response during traffic generation. More... | |
#define | TEST_MESSAGE_SIZE 100 |
Size of test messages. More... | |
Typedefs | |
typedef void(* | GNUNET_ATS_TEST_TopologySetupDoneCallback) (void *cls, struct BenchmarkPeer *masters, struct BenchmarkPeer *slaves) |
Callback to call when topology setup is completed. More... | |
typedef void(* | GNUNET_ATS_TEST_LogRequest) (void *cls, const struct GNUNET_HELLO_Address *address, int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, const struct GNUNET_ATS_Properties *prop) |
Callback called when logging is required for the data contained. More... | |
typedef void(* | GNUNET_ATS_TESTING_EpisodeDoneCallback) (struct Episode *e) |
typedef void(* | GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e, struct GNUNET_TIME_Relative duration, int success) |
Variables | |
struct GNUNET_CONFIGURATION_Handle * | cfg |
Handle to our configuration. More... | |
ats testing library: setup topology and provide logging to test ats
Definition in file ats-testing.h.
#define TEST_ATS_PREFERENCE_DEFAULT 1.0 |
Definition at line 33 of file ats-testing.h.
Referenced by main_run().
#define TEST_MESSAGE_TYPE_PING 12345 |
Message type sent for traffic generation.
Definition at line 38 of file ats-testing.h.
Referenced by comm_schedule_send(), core_connect_adapter(), GNUNET_ATS_TEST_traffic_handle_ping(), and transport_connect_adapter().
#define TEST_MESSAGE_TYPE_PONG 12346 |
Message type sent as response during traffic generation.
Definition at line 43 of file ats-testing.h.
Referenced by core_connect_adapter(), and transport_connect_adapter().
#define TEST_MESSAGE_SIZE 100 |
Size of test messages.
Definition at line 48 of file ats-testing.h.
Referenced by get_delay(), GNUNET_ATS_TEST_traffic_handle_ping(), GNUNET_ATS_TEST_traffic_handle_pong(), update_ping_data(), and update_pong_data().
typedef void(* GNUNET_ATS_TEST_TopologySetupDoneCallback) (void *cls, struct BenchmarkPeer *masters, struct BenchmarkPeer *slaves) |
Callback to call when topology setup is completed.
cls | the closure |
masters | array of master peers |
slaves | array of master peers |
Definition at line 85 of file ats-testing.h.
typedef void(* GNUNET_ATS_TEST_LogRequest) (void *cls, const struct GNUNET_HELLO_Address *address, int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, const struct GNUNET_ATS_Properties *prop) |
Callback called when logging is required for the data contained.
cls | the closure |
address | an address |
address_active | is address active |
bandwidth_out | bandwidth outbound |
bandwidth_in | bandwidth inbound |
prop | performance information |
Definition at line 100 of file ats-testing.h.
Definition at line 482 of file ats-testing.h.
typedef void(* GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e, struct GNUNET_TIME_Relative duration, int success) |
Definition at line 484 of file ats-testing.h.
enum GeneratorType |
Definition at line 69 of file ats-testing.h.
enum OperationType |
Enumerator | |
---|---|
SOLVER_OP_ADD_ADDRESS | |
SOLVER_OP_DEL_ADDRESS | |
SOLVER_OP_START_SET_PROPERTY | |
SOLVER_OP_STOP_SET_PROPERTY | |
SOLVER_OP_START_SET_PREFERENCE | |
SOLVER_OP_STOP_SET_PREFERENCE | |
SOLVER_OP_START_REQUEST | |
SOLVER_OP_STOP_REQUEST | |
START_SEND | |
STOP_SEND | |
START_PREFERENCE | |
STOP_PREFERENCE | |
OP_PEER_CREATE | Peer create operation. |
OP_PEER_START | Peer start operation. |
OP_PEER_STOP | Peer stop operation. |
OP_PEER_DESTROY | Peer destroy operation. |
OP_PEER_INFO | Get peer information operation. |
OP_PEER_RECONFIGURE | Reconfigure a peer. |
OP_OVERLAY_CONNECT | Overlay connection operation. |
OP_FORWARDED | Forwarded operation. |
OP_LINK_CONTROLLERS | Link controllers operation. |
OP_GET_SLAVE_CONFIG | Get slave config operation. |
OP_SHUTDOWN_PEERS | Stop and destroy all peers. |
OP_MANAGE_SERVICE | Start/stop service at a peer. |
Definition at line 470 of file ats-testing.h.
void GNUNET_ATS_TEST_experimentation_run | ( | struct Experiment * | e, |
GNUNET_ATS_TESTING_EpisodeDoneCallback | ep_done_cb, | ||
GNUNET_ATS_TESTING_ExperimentDoneCallback | e_done_cb | ||
) |
Execute the specified experiment.
e | the Experiment |
ep_done_cb | a episode is completed |
e_done_cb | the experiment is completed |
Definition at line 673 of file ats-testing-experiment.c.
References Experiment::cur, Episode::duration, Experiment::e_done_cb, enforce_episode(), Experiment::ep_done_cb, Experiment::episode_timeout_task, Experiment::experiment_timeout_task, GNUNET_SCHEDULER_add_delayed(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_YES, Episode::id, Experiment::max_duration, Experiment::name, Experiment::start, Experiment::start_time, timeout_episode(), and timeout_experiment().
Referenced by topology_setup_done().
struct Experiment* GNUNET_ATS_TEST_experimentation_load | ( | const char * | filename | ) |
Load an experiment from a file.
filename | the file |
Definition at line 704 of file ats-testing-experiment.c.
References cfg, Experiment::cfg_file, create_experiment(), e, free_experiment(), GNUNET_CONFIGURATION_create(), GNUNET_CONFIGURATION_destroy(), GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONFIGURATION_load(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_YES, load_episodes(), Experiment::log_freq, Experiment::max_duration, Experiment::name, Experiment::num_episodes, Experiment::num_masters, Experiment::num_slaves, and Experiment::total_duration.
Referenced by main().
void GNUNET_ATS_TEST_experimentation_stop | ( | struct Experiment * | e | ) |
Stop an experiment.
e | the experiment |
Definition at line 804 of file ats-testing-experiment.c.
References Experiment::episode_timeout_task, Experiment::experiment_timeout_task, free_experiment(), and GNUNET_SCHEDULER_cancel().
Referenced by do_shutdown().
void GNUNET_ATS_TEST_traffic_handle_ping | ( | struct BenchmarkPartner * | p | ) |
Definition at line 183 of file ats-testing-traffic.c.
References BenchmarkPartner::bytes_received, BenchmarkPartner::dest, env, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MQ_msg, GNUNET_MQ_notify_sent(), GNUNET_MQ_send(), BenchmarkPartner::me, BenchmarkPartner::messages_received, BenchmarkPartner::mq, msg, BenchmarkPeer::no, TestMessage::padding, TEST_MESSAGE_SIZE, TEST_MESSAGE_TYPE_PING, BenchmarkPeer::total_bytes_received, BenchmarkPeer::total_messages_received, and update_pong_data().
Referenced by handle_ping().
void GNUNET_ATS_TEST_traffic_handle_pong | ( | struct BenchmarkPartner * | p | ) |
Definition at line 212 of file ats-testing-traffic.c.
References TrafficGenerator::base_rate, BenchmarkPartner::bytes_received, comm_schedule_send(), BenchmarkPartner::dest, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_now(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_absolute_get_remaining(), GNUNET_TIME_relative_min(), GNUNET_TIME_UNIT_SECONDS, BenchmarkPartner::last_message_sent, BenchmarkPartner::me, BenchmarkPartner::messages_received, TrafficGenerator::next_ping_transmission, BenchmarkPeer::no, GNUNET_TIME_Relative::rel_value_us, TrafficGenerator::send_task, TEST_MESSAGE_SIZE, BenchmarkPartner::tg, BenchmarkPartner::total_app_rtt, BenchmarkPeer::total_bytes_received, and BenchmarkPeer::total_messages_received.
Referenced by handle_pong().
struct TrafficGenerator* GNUNET_ATS_TEST_generate_traffic_start | ( | struct BenchmarkPeer * | src, |
struct BenchmarkPartner * | dest, | ||
enum GeneratorType | type, | ||
unsigned int | base_rate, | ||
unsigned int | max_rate, | ||
struct GNUNET_TIME_Relative | period, | ||
struct GNUNET_TIME_Relative | duration | ||
) |
Generate between the source master and the partner and send traffic with a maximum rate.
src | traffic source |
dest | traffic partner |
type | type of traffic to generate |
base_rate | traffic base rate to send data with |
max_rate | traffic maximum rate to send data with |
period | duration of a period of traffic generation (~ 1/frequency) |
duration | how long to generate traffic |
Definition at line 273 of file ats-testing-traffic.c.
References TrafficGenerator::base_rate, comm_schedule_send(), TrafficGenerator::dest, BenchmarkPartner::dest, TrafficGenerator::duration_period, GNUNET_ATS_TEST_TG_CONSTANT, GNUNET_ATS_TEST_TG_LINEAR, GNUNET_ATS_TEST_TG_RANDOM, GNUNET_ATS_TEST_TG_SINUS, GNUNET_break, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_INFO, GNUNET_i2s(), GNUNET_log, GNUNET_new, GNUNET_SCHEDULER_add_now(), GNUNET_TIME_absolute_get(), GNUNET_TIME_UNIT_FOREVER_ABS, BenchmarkPeer::id, TrafficGenerator::max_rate, BenchmarkPartner::me, TrafficGenerator::next_ping_transmission, BenchmarkPeer::no, TrafficGenerator::send_task, TrafficGenerator::src, BenchmarkPartner::tg, TrafficGenerator::time_start, type, and TrafficGenerator::type.
Referenced by enforce_start_send(), and topology_setup_done().
void GNUNET_ATS_TEST_generate_traffic_stop | ( | struct TrafficGenerator * | tg | ) |
Definition at line 360 of file ats-testing-traffic.c.
References TrafficGenerator::dest, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_cancel(), TrafficGenerator::send_task, and BenchmarkPartner::tg.
Referenced by enforce_start_send(), enforce_stop_send(), and GNUNET_ATS_TEST_generate_traffic_stop_all().
void GNUNET_ATS_TEST_generate_traffic_stop_all | ( | void | ) |
Stop all traffic generators.
Definition at line 379 of file ats-testing-traffic.c.
References GNUNET_ATS_TEST_generate_traffic_stop(), TrafficGenerator::next, and tg_head.
Referenced by do_shutdown(), and experiment_done_cb().
struct PreferenceGenerator* GNUNET_ATS_TEST_generate_preferences_start | ( | struct BenchmarkPeer * | src, |
struct BenchmarkPartner * | dest, | ||
enum GeneratorType | type, | ||
unsigned int | base_value, | ||
unsigned int | value_rate, | ||
struct GNUNET_TIME_Relative | period, | ||
struct GNUNET_TIME_Relative | frequency, | ||
enum GNUNET_ATS_PreferenceKind | kind | ||
) |
Generate between the source master and the partner and set preferences with a value depending on the generator.
src | source |
dest | partner |
type | type of preferences to generate |
base_value | traffic base rate to send data with |
value_rate | traffic maximum rate to send data with |
period | duration of a period of preferences generation (~ 1/frequency) |
frequency | how long to generate preferences |
kind | ATS preference to generate |
src | source |
dest | partner |
type | type of preferences to generate |
base_value | traffic base rate to send data with |
value_rate | traffic maximum rate to send data with |
period | duration of a period of preferences generation (~ 1/frequency) |
frequency | how long to generate preferences |
kind | ATS preference to generate |
Definition at line 157 of file ats-testing-preferences.c.
References PreferenceGenerator::base_value, PreferenceGenerator::dest, BenchmarkPartner::dest, PreferenceGenerator::duration_period, PreferenceGenerator::frequency, GNUNET_ATS_TEST_TG_CONSTANT, GNUNET_ATS_TEST_TG_LINEAR, GNUNET_ATS_TEST_TG_RANDOM, GNUNET_ATS_TEST_TG_SINUS, GNUNET_break, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_INFO, GNUNET_i2s(), GNUNET_log, GNUNET_new, GNUNET_SCHEDULER_add_now(), GNUNET_TIME_absolute_get(), BenchmarkPeer::id, PreferenceGenerator::kind, PreferenceGenerator::max_value, BenchmarkPartner::me, BenchmarkPeer::no, BenchmarkPartner::pg, set_pref_task(), PreferenceGenerator::set_task, PreferenceGenerator::src, PreferenceGenerator::time_start, type, and PreferenceGenerator::type.
Referenced by enforce_start_preference().
void GNUNET_ATS_TEST_generate_preferences_stop | ( | struct PreferenceGenerator * | pg | ) |
Definition at line 232 of file ats-testing-preferences.c.
References PreferenceGenerator::dest, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SCHEDULER_cancel(), BenchmarkPartner::pg, and PreferenceGenerator::set_task.
Referenced by enforce_start_preference(), enforce_stop_preference(), and GNUNET_ATS_TEST_generate_preferences_stop_all().
void GNUNET_ATS_TEST_generate_preferences_stop_all | ( | void | ) |
Stop all preferences generators.
Definition at line 251 of file ats-testing-preferences.c.
References GNUNET_ATS_TEST_generate_preferences_stop(), PreferenceGenerator::next, and pg_head.
Referenced by do_shutdown(), and experiment_done_cb().
struct LoggingHandle* GNUNET_ATS_TEST_logging_start | ( | struct GNUNET_TIME_Relative | log_frequency, |
const char * | testname, | ||
struct BenchmarkPeer * | masters, | ||
int | num_masters, | ||
int | num_slaves, | ||
int | verbose | ||
) |
Start logging.
log_frequency | the logging frequency |
testname | the testname |
masters | the master peers used for benchmarking |
num_masters | the number of master peers |
num_slaves | the number of slave peers |
verbose | verbose logging |
Definition at line 944 of file ats-testing-log.c.
References _, collect_log_task(), LoggingHandle::frequency, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_malloc, GNUNET_new, GNUNET_SCHEDULER_add_now(), GNUNET_TIME_absolute_get(), GNUNET_YES, l, LoggingHandle::log_task, LoggingHandle::lp, LoggingHandle::name, LoggingHandle::num_masters, LoggingHandle::num_slaves, LoggingPeer::peer, LoggingHandle::running, LoggingPeer::start, verbose, and LoggingHandle::verbose.
Referenced by topology_setup_done().
void GNUNET_ATS_TEST_logging_clean_up | ( | struct LoggingHandle * | l | ) |
Stop logging.
l | the logging handle |
Stop logging.
l | the logging handle |
Definition at line 909 of file ats-testing-log.c.
References GNUNET_ATS_TEST_logging_stop(), GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_YES, LoggingPeer::head, LoggingHandle::lp, LoggingHandle::num_masters, LoggingHandle::running, PeerLoggingTimestep::slaves_log, and LoggingPeer::tail.
Referenced by do_shutdown().
void GNUNET_ATS_TEST_logging_stop | ( | struct LoggingHandle * | l | ) |
Stop logging.
l | the logging handle |
Definition at line 886 of file ats-testing-log.c.
References _, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_YES, LoggingHandle::log_task, and LoggingHandle::running.
Referenced by do_shutdown(), experiment_done_cb(), and GNUNET_ATS_TEST_logging_clean_up().
void GNUNET_ATS_TEST_logging_now | ( | struct LoggingHandle * | l | ) |
Log all data now.
l | logging handle to use |
Definition at line 677 of file ats-testing-log.c.
References PartnerLoggingTimestep::app_rtt, PartnerLoggingTimestep::ats_delay, PartnerLoggingTimestep::ats_distance, PartnerLoggingTimestep::ats_network_type, PartnerLoggingTimestep::ats_utilization_in, PartnerLoggingTimestep::ats_utilization_out, PartnerLoggingTimestep::bandwidth_in, BenchmarkPartner::bandwidth_in, PartnerLoggingTimestep::bandwidth_out, BenchmarkPartner::bandwidth_out, BenchmarkPartner::bytes_received, BenchmarkPartner::bytes_sent, GNUNET_ATS_Properties::delay, BenchmarkPartner::dest, GNUNET_ATS_Properties::distance, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_malloc, GNUNET_new, GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_UNIT_SECONDS, GNUNET_YES, LoggingPeer::head, LoggingHandle::lp, BenchmarkPartner::messages_received, BenchmarkPartner::messages_sent, BenchmarkPeer::no, LoggingHandle::num_masters, BenchmarkPeer::num_partners, p, BenchmarkPeer::partners, LoggingPeer::peer, PartnerLoggingTimestep::pref_bandwidth, BenchmarkPartner::pref_bandwidth, PartnerLoggingTimestep::pref_delay, BenchmarkPartner::pref_delay, PeerLoggingTimestep::prev, BenchmarkPartner::props, GNUNET_TIME_Relative::rel_value_us, LoggingHandle::running, GNUNET_ATS_Properties::scope, PartnerLoggingTimestep::slave, PeerLoggingTimestep::slaves_log, LoggingPeer::start, LoggingPeer::tail, PartnerLoggingTimestep::throughput_recv, PartnerLoggingTimestep::throughput_sent, PeerLoggingTimestep::timestamp, PartnerLoggingTimestep::total_app_rtt, BenchmarkPartner::total_app_rtt, PartnerLoggingTimestep::total_bytes_received, PeerLoggingTimestep::total_bytes_received, BenchmarkPeer::total_bytes_received, PartnerLoggingTimestep::total_bytes_sent, PeerLoggingTimestep::total_bytes_sent, BenchmarkPeer::total_bytes_sent, PartnerLoggingTimestep::total_messages_received, PeerLoggingTimestep::total_messages_received, BenchmarkPeer::total_messages_received, PartnerLoggingTimestep::total_messages_sent, PeerLoggingTimestep::total_messages_sent, BenchmarkPeer::total_messages_sent, PeerLoggingTimestep::total_throughput_recv, PeerLoggingTimestep::total_throughput_send, GNUNET_ATS_Properties::utilization_out, and LoggingHandle::verbose.
Referenced by collect_log_task().
void GNUNET_ATS_TEST_logging_write_to_file | ( | struct LoggingHandle * | l, |
const char * | test_name, | ||
int | plots | ||
) |
Write logging data to file.
l | logging handle to use |
test_name | name of the current test |
plots | create gnuplots: GNUNET_YES or GNUNET_NO |
Definition at line 447 of file ats-testing-log.c.
References GNUNET_TIME_Absolute::abs_value_us, PartnerLoggingTimestep::app_rtt, PartnerLoggingTimestep::ats_delay, PartnerLoggingTimestep::ats_distance, PartnerLoggingTimestep::ats_network_type, PartnerLoggingTimestep::ats_utilization_in, PartnerLoggingTimestep::ats_utilization_out, PartnerLoggingTimestep::bandwidth_in, PartnerLoggingTimestep::bandwidth_out, data, removetrailingwhitespace::f, GNUNET_asprintf(), GNUNET_break, GNUNET_DISK_file_close(), GNUNET_DISK_file_open(), GNUNET_DISK_file_write(), GNUNET_DISK_OPEN_CREATE, GNUNET_DISK_OPEN_WRITE, GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_free, GNUNET_log, GNUNET_log_strerror_file, GNUNET_OK, GNUNET_SYSERR, GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_YES, LoggingPeer::head, LoggingHandle::lp, LoggingHandle::name, PeerLoggingTimestep::next, BenchmarkPeer::no, LoggingHandle::num_masters, BenchmarkPeer::num_partners, LoggingHandle::num_slaves, LoggingPeer::peer, PartnerLoggingTimestep::pref_bandwidth, PartnerLoggingTimestep::pref_delay, GNUNET_TIME_Relative::rel_value_us, PartnerLoggingTimestep::slave, PeerLoggingTimestep::slaves_log, LoggingPeer::start, PartnerLoggingTimestep::throughput_recv, PartnerLoggingTimestep::throughput_sent, PeerLoggingTimestep::timestamp, PartnerLoggingTimestep::total_bytes_received, PeerLoggingTimestep::total_bytes_received, PartnerLoggingTimestep::total_bytes_sent, PeerLoggingTimestep::total_bytes_sent, PartnerLoggingTimestep::total_messages_received, PeerLoggingTimestep::total_messages_received, PartnerLoggingTimestep::total_messages_sent, PeerLoggingTimestep::total_messages_sent, PeerLoggingTimestep::total_throughput_recv, PeerLoggingTimestep::total_throughput_send, LoggingHandle::verbose, write_bw_gnuplot_script(), write_rtt_gnuplot_script(), and write_throughput_gnuplot_script().
Referenced by experiment_done_cb().
struct BenchmarkPeer* GNUNET_ATS_TEST_get_peer | ( | int | src | ) |
Topology related functions.
Definition at line 894 of file ats-testing.c.
References GNUNET_ATS_TEST_Topology::mps, and GNUNET_ATS_TEST_Topology::num_masters.
Referenced by enforce_start_preference(), and enforce_start_send().
struct BenchmarkPartner* GNUNET_ATS_TEST_get_partner | ( | int | src, |
int | dest | ||
) |
Definition at line 903 of file ats-testing.c.
References BenchmarkPartner::dest, GNUNET_ATS_TEST_Topology::mps, GNUNET_ATS_TEST_Topology::num_masters, GNUNET_ATS_TEST_Topology::num_slaves, and BenchmarkPeer::partners.
Referenced by enforce_start_preference(), enforce_start_send(), enforce_stop_preference(), and enforce_stop_send().
void GNUNET_ATS_TEST_create_topology | ( | char * | name, |
char * | cfg_file, | ||
unsigned int | num_slaves, | ||
unsigned int | num_masters, | ||
int | test_core, | ||
GNUNET_ATS_TEST_TopologySetupDoneCallback | done_cb, | ||
void * | done_cb_cls, | ||
GNUNET_ATS_AddressInformationCallback | log_request_cb | ||
) |
Create a topology for ats testing.
name | test name |
cfg_file | configuration file to use for the peers |
num_slaves | number of slaves |
num_masters | number of masters |
test_core | connect to CORE service (GNUNET_YES) or transport (GNUNET_NO) |
done_cb | function to call when topology is setup |
done_cb_cls | cls for callback |
log_request_cb | callback to call when logging is required |
name | test name |
cfg_file | configuration file to use for the peers |
num_slaves | number of slaves |
num_masters | number of masters |
test_core | connect to CORE service (GNUNET_YES) or transport (GNUNET_NO) |
done_cb | function to call when topology is setup |
done_cb_cls | cls for callback |
log_request_cb | callback to call when logging is required |
Definition at line 927 of file ats-testing.c.
References GNUNET_ATS_TEST_Topology::ats_perf_cb, controller_event_cb(), GNUNET_ATS_TEST_Topology::done_cb, GNUNET_ATS_TEST_Topology::done_cb_cls, event_mask, GNUNET_new, GNUNET_new_array, GNUNET_TESTBED_ET_CONNECT, GNUNET_TESTBED_ET_OPERATION_FINISHED, GNUNET_TESTBED_test_run(), main_run(), GNUNET_ATS_TEST_Topology::mps, GNUNET_ATS_TEST_Topology::num_masters, GNUNET_ATS_TEST_Topology::num_slaves, GNUNET_ATS_TEST_Topology::sps, and GNUNET_ATS_TEST_Topology::test_core.
Referenced by main().
void GNUNET_ATS_TEST_shutdown_topology | ( | void | ) |
Shutdown topology.
Definition at line 967 of file ats-testing.c.
References GNUNET_SCHEDULER_shutdown().
Referenced by do_shutdown().
struct GNUNET_CONFIGURATION_Handle* cfg |
Handle to our configuration.
Handle to our configuration.
Definition at line 51 of file ats-testing.c.