![]() |
GNUnet
0.11.x
|
ats benchmark: controlled experiment execution More...
Go to the source code of this file.
ats benchmark: controlled experiment execution
Definition in file ats-testing-experiment.c.
const char* print_op | ( | enum OperationType | op | ) |
Definition at line 31 of file ats-testing-experiment.c.
References START_PREFERENCE, START_SEND, STOP_PREFERENCE, and STOP_SEND.
Referenced by enforce_episode(), and load_episode().
|
static |
Definition at line 55 of file ats-testing-experiment.c.
References e, GNUNET_new, GNUNET_TIME_UNIT_ZERO, Experiment::name, Experiment::num_masters, Experiment::num_slaves, Experiment::start, and Experiment::total_duration.
Referenced by GNUNET_ATS_TEST_experimentation_load().
|
static |
Definition at line 70 of file ats-testing-experiment.c.
References Experiment::cfg_file, GNUNET_free, Episode::head, Experiment::name, GNUNET_ATS_TEST_Operation::next, Episode::next, and Experiment::start.
Referenced by GNUNET_ATS_TEST_experimentation_load(), and GNUNET_ATS_TEST_experimentation_stop().
|
static |
Definition at line 98 of file ats-testing-experiment.c.
References GNUNET_ATS_TEST_Operation::base_rate, GNUNET_ATS_TEST_Operation::dest_id, Episode::duration, GNUNET_ATS_TEST_Operation::frequency, GNUNET_ATS_TEST_Operation::gen_type, GNUNET_asprintf(), GNUNET_ATS_PREFERENCE_BANDWIDTH, GNUNET_ATS_PREFERENCE_LATENCY, GNUNET_ATS_TEST_TG_CONSTANT, GNUNET_ATS_TEST_TG_LINEAR, GNUNET_ATS_TEST_TG_RANDOM, GNUNET_ATS_TEST_TG_SINUS, GNUNET_break, GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONTAINER_DLL_insert, GNUNET_free, GNUNET_new, GNUNET_OK, GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_YES, Episode::head, Episode::id, GNUNET_ATS_TEST_Operation::max_rate, Experiment::num_masters, Experiment::num_slaves, op, GNUNET_ATS_TEST_Operation::period, GNUNET_ATS_TEST_Operation::pref_type, print_op(), GNUNET_ATS_TEST_Operation::src_id, START_PREFERENCE, START_SEND, STOP_PREFERENCE, STOP_SEND, Episode::tail, type, and GNUNET_ATS_TEST_Operation::type.
Referenced by load_episodes().
|
static |
Definition at line 400 of file ats-testing-experiment.c.
References Episode::duration, GNUNET_asprintf(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_free, GNUNET_new, GNUNET_OK, GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_TIME_relative_add(), GNUNET_YES, Episode::id, load_episode(), Episode::next, Experiment::num_episodes, Experiment::start, and Experiment::total_duration.
Referenced by GNUNET_ATS_TEST_experimentation_load().
|
static |
Definition at line 457 of file ats-testing-experiment.c.
References e, Experiment::e_done_cb, Experiment::episode_timeout_task, Experiment::experiment_timeout_task, GNUNET_SCHEDULER_cancel(), GNUNET_SYSERR, GNUNET_TIME_absolute_get_duration(), and Experiment::start_time.
Referenced by GNUNET_ATS_TEST_experimentation_run().
|
static |
Definition at line 476 of file ats-testing-experiment.c.
References GNUNET_ATS_TEST_Operation::base_rate, GNUNET_ATS_TEST_Operation::dest_id, GNUNET_ATS_TEST_Operation::gen_type, GNUNET_ATS_TEST_generate_traffic_start(), GNUNET_ATS_TEST_generate_traffic_stop(), GNUNET_ATS_TEST_get_partner(), GNUNET_ATS_TEST_get_peer(), GNUNET_break, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_ATS_TEST_Operation::max_rate, peer, GNUNET_ATS_TEST_Operation::period, GNUNET_ATS_TEST_Operation::src_id, and BenchmarkPartner::tg.
Referenced by enforce_episode().
|
static |
Definition at line 515 of file ats-testing-experiment.c.
References GNUNET_ATS_TEST_Operation::dest_id, GNUNET_ATS_TEST_generate_traffic_stop(), GNUNET_ATS_TEST_get_partner(), GNUNET_break, p, GNUNET_ATS_TEST_Operation::src_id, and BenchmarkPartner::tg.
Referenced by enforce_episode().
|
static |
Definition at line 539 of file ats-testing-experiment.c.
References GNUNET_ATS_TEST_Operation::base_rate, GNUNET_ATS_TEST_Operation::dest_id, GNUNET_ATS_TEST_Operation::frequency, GNUNET_ATS_TEST_Operation::gen_type, GNUNET_ATS_TEST_generate_preferences_start(), GNUNET_ATS_TEST_generate_preferences_stop(), GNUNET_ATS_TEST_get_partner(), GNUNET_ATS_TEST_get_peer(), GNUNET_break, GNUNET_ATS_TEST_Operation::max_rate, peer, GNUNET_ATS_TEST_Operation::period, BenchmarkPartner::pg, GNUNET_ATS_TEST_Operation::pref_type, and GNUNET_ATS_TEST_Operation::src_id.
Referenced by enforce_episode().
|
static |
Definition at line 579 of file ats-testing-experiment.c.
References GNUNET_ATS_TEST_Operation::dest_id, GNUNET_ATS_TEST_generate_preferences_stop(), GNUNET_ATS_TEST_get_partner(), GNUNET_break, p, BenchmarkPartner::pg, and GNUNET_ATS_TEST_Operation::src_id.
Referenced by enforce_episode().
|
static |
Definition at line 603 of file ats-testing-experiment.c.
References GNUNET_ATS_TEST_Operation::base_rate, GNUNET_ATS_TEST_Operation::dest_id, enforce_start_preference(), enforce_start_send(), enforce_stop_preference(), enforce_stop_send(), Episode::head, GNUNET_ATS_TEST_Operation::next, print_op(), GNUNET_ATS_TEST_Operation::src_id, START_PREFERENCE, START_SEND, STOP_PREFERENCE, STOP_SEND, and GNUNET_ATS_TEST_Operation::type.
Referenced by GNUNET_ATS_TEST_experimentation_run(), and timeout_episode().
|
static |
Definition at line 637 of file ats-testing-experiment.c.
References Experiment::cur, Episode::duration, e, Experiment::e_done_cb, enforce_episode(), Experiment::ep_done_cb, Experiment::episode_timeout_task, Experiment::experiment_timeout_task, GNUNET_OK, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_cancel(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get_duration(), GNUNET_YES, Episode::id, Episode::next, and Experiment::start_time.
Referenced by GNUNET_ATS_TEST_experimentation_run().
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().