![]() |
GNUnet
0.11.x
|
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_ats_plugin.h"
#include "gnunet_ats_service.h"
#include "ats-testing.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_ATS_TESTING_SolverHandle |
Solver. More... | |
Enumerations | |
enum | GNUNET_ATS_Solvers { GNUNET_ATS_SOLVER_PROPORTIONAL, GNUNET_ATS_SOLVER_MLP, GNUNET_ATS_SOLVER_RIL, GNUNET_ATS_SOLVER_PROPORTIONAL, GNUNET_ATS_SOLVER_MLP, GNUNET_ATS_SOLVER_RIL } |
Variables | |
static struct Experiment * | e |
static struct GNUNET_ATS_TESTING_SolverHandle * | sh |
static char * | opt_exp_file |
cmd option -e: experiment file More... | |
static char * | opt_solver |
static int | opt_log |
cmd option -l: enable logging More... | |
static int | opt_plot |
cmd option -p: enable plots More... | |
static int | opt_verbose |
cmd option -v: verbose logs More... | |
enum GNUNET_ATS_Solvers |
Enumerator | |
---|---|
GNUNET_ATS_SOLVER_PROPORTIONAL | |
GNUNET_ATS_SOLVER_MLP | |
GNUNET_ATS_SOLVER_RIL | |
GNUNET_ATS_SOLVER_PROPORTIONAL | |
GNUNET_ATS_SOLVER_MLP | |
GNUNET_ATS_SOLVER_RIL |
Definition at line 838 of file gnunet-solver-eval.c.
const char* print_op | ( | enum OperationType | op | ) |
Experiments.
Definition at line 37 of file gnunet-solver-eval.c.
References START_PREFERENCE, START_SEND, STOP_PREFERENCE, and STOP_SEND.
Referenced by enforce_episode(), and load_episode().
|
static |
Definition at line 61 of file gnunet-solver-eval.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_solvers_experimentation_load().
|
static |
Definition at line 76 of file gnunet-solver-eval.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_solvers_experimentation_load(), and GNUNET_ATS_solvers_experimentation_stop().
|
static |
Definition at line 104 of file gnunet-solver-eval.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 413 of file gnunet-solver-eval.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_solvers_experimentation_load().
|
static |
Definition at line 470 of file gnunet-solver-eval.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_solvers_experimentation_run().
|
static |
Definition at line 489 of file gnunet-solver-eval.c.
Referenced by enforce_episode().
|
static |
Definition at line 525 of file gnunet-solver-eval.c.
Referenced by enforce_episode().
|
static |
Definition at line 549 of file gnunet-solver-eval.c.
Referenced by enforce_episode().
|
static |
Definition at line 586 of file gnunet-solver-eval.c.
Referenced by enforce_episode().
|
static |
Definition at line 610 of file gnunet-solver-eval.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_solvers_experimentation_run(), and timeout_episode().
|
static |
Definition at line 644 of file gnunet-solver-eval.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_solvers_experimentation_run().
void GNUNET_ATS_solvers_experimentation_run | ( | struct Experiment * | e, |
GNUNET_ATS_TESTING_EpisodeDoneCallback | ep_done_cb, | ||
GNUNET_ATS_TESTING_ExperimentDoneCallback | e_done_cb | ||
) |
Definition at line 680 of file gnunet-solver-eval.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().
struct Experiment* GNUNET_ATS_solvers_experimentation_load | ( | char * | filename | ) |
Definition at line 711 of file gnunet-solver-eval.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 run().
void GNUNET_ATS_solvers_experimentation_stop | ( | struct Experiment * | e | ) |
Definition at line 811 of file gnunet-solver-eval.c.
References Experiment::episode_timeout_task, Experiment::experiment_timeout_task, free_experiment(), and GNUNET_SCHEDULER_cancel().
void GNUNET_ATS_solvers_solver_stop | ( | struct GNUNET_ATS_TESTING_SolverHandle * | sh | ) |
Definition at line 846 of file gnunet-solver-eval.c.
References GNUNET_free, GNUNET_PLUGIN_unload(), GNUNET_ATS_TESTING_SolverHandle::plugin, and GNUNET_ATS_TESTING_SolverHandle::solver.
struct GNUNET_ATS_TESTING_SolverHandle* GNUNET_ATS_solvers_solver_start | ( | enum GNUNET_ATS_Solvers | type | ) |
Definition at line 855 of file gnunet-solver-eval.c.
References GNUNET_asprintf(), GNUNET_ATS_SOLVER_MLP, GNUNET_ATS_SOLVER_PROPORTIONAL, GNUNET_ATS_SOLVER_RIL, GNUNET_break, GNUNET_new, GNUNET_ATS_TESTING_SolverHandle::plugin, sh, and GNUNET_ATS_TESTING_SolverHandle::solver.
Referenced by run().
|
static |
Definition at line 920 of file gnunet-solver-eval.c.
References GNUNET_ATS_SOLVER_MLP, GNUNET_ATS_SOLVER_PROPORTIONAL, GNUNET_ATS_SOLVER_RIL, GNUNET_ATS_solvers_experimentation_load(), GNUNET_ATS_solvers_solver_start(), opt_exp_file, opt_solver, and GNUNET_ATS_TESTING_SolverHandle::solver.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function of the benchmark.
argc | argument count |
argv | argument values |
Definition at line 986 of file gnunet-solver-eval.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_string(), GNUNET_NO, GNUNET_OK, GNUNET_PROGRAM_run(), opt_exp_file, opt_log, opt_plot, opt_solver, opt_verbose, and run().
|
static |
Definition at line 893 of file gnunet-solver-eval.c.
Referenced by create_experiment(), GNUNET_ATS_solvers_experimentation_load(), timeout_episode(), and timeout_experiment().
|
static |
Definition at line 895 of file gnunet-solver-eval.c.
Referenced by GNUNET_ATS_solvers_solver_start().
|
static |
cmd option -e: experiment file
Definition at line 900 of file gnunet-solver-eval.c.
|
static |
Definition at line 902 of file gnunet-solver-eval.c.
|
static |
cmd option -l: enable logging
Definition at line 907 of file gnunet-solver-eval.c.
Referenced by main().
|
static |
cmd option -p: enable plots
Definition at line 912 of file gnunet-solver-eval.c.
Referenced by main().
|
static |
cmd option -v: verbose logs
Definition at line 917 of file gnunet-solver-eval.c.
Referenced by main().