![]() |
GNUnet
0.11.x
|
ats traffic simulator: this tool uses the ats-test library to setup a topology and generate traffic between these peers. 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 "ats-testing.h"
Go to the source code of this file.
Macros | |
#define | TEST_TIMEOUT |
Functions | |
static void | evaluate (struct GNUNET_TIME_Relative duration_total) |
static void | do_shutdown (void *cls) |
static void | do_timeout (void *cls) |
static void | log_request__cb (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 *ats) |
static void | experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration, int success) |
static void | episode_done_cb (struct Episode *ep) |
static void | topology_setup_done (void *cls, struct BenchmarkPeer *masters, struct BenchmarkPeer *slaves) |
static void | parse_args (int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
Variables | |
static struct BenchmarkPeer * | masters_p |
static struct BenchmarkPeer * | slaves_p |
static char * | opt_exp_file |
cmd option -e: experiment file More... | |
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... | |
static struct GNUNET_SCHEDULER_Task * | timeout_task |
static struct Experiment * | e |
static struct LoggingHandle * | l |
ats traffic simulator: this tool uses the ats-test library to setup a topology and generate traffic between these peers.
The traffic description is loaded from a experiment description file
Definition in file gnunet-ats-sim.c.
#define TEST_TIMEOUT |
Definition at line 35 of file gnunet-ats-sim.c.
|
static |
Definition at line 69 of file gnunet-ats-sim.c.
References _, BenchmarkPartner::bytes_received, BenchmarkPartner::bytes_sent, BenchmarkPartner::dest, duration, BenchmarkPartner::messages_sent, BenchmarkPeer::no, Experiment::num_masters, Experiment::num_slaves, p, BenchmarkPeer::partners, BenchmarkPeer::pref_partner, GNUNET_TIME_Relative::rel_value_us, BenchmarkPartner::total_app_rtt, BenchmarkPeer::total_bytes_received, and BenchmarkPeer::total_bytes_sent.
Referenced by experiment_done_cb().
|
static |
Definition at line 139 of file gnunet-ats-sim.c.
References GNUNET_ATS_TEST_experimentation_stop(), GNUNET_ATS_TEST_generate_preferences_stop_all(), GNUNET_ATS_TEST_generate_traffic_stop_all(), GNUNET_ATS_TEST_logging_clean_up(), GNUNET_ATS_TEST_logging_stop(), GNUNET_ATS_TEST_shutdown_topology(), and GNUNET_SCHEDULER_cancel().
Referenced by topology_setup_done().
|
static |
Definition at line 170 of file gnunet-ats-sim.c.
References GNUNET_SCHEDULER_shutdown().
Referenced by topology_setup_done().
|
static |
Definition at line 178 of file gnunet-ats-sim.c.
Referenced by main().
|
static |
Definition at line 194 of file gnunet-ats-sim.c.
References evaluate(), GNUNET_ATS_TEST_generate_preferences_stop_all(), GNUNET_ATS_TEST_generate_traffic_stop_all(), GNUNET_ATS_TEST_logging_stop(), GNUNET_ATS_TEST_logging_write_to_file(), GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_OK, GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_YES, opt_exp_file, opt_log, and opt_plot.
Referenced by topology_setup_done().
|
static |
Definition at line 223 of file gnunet-ats-sim.c.
References GNUNET_ERROR_TYPE_INFO, GNUNET_log, and Episode::id.
Referenced by topology_setup_done().
|
static |
Definition at line 232 of file gnunet-ats-sim.c.
References do_shutdown(), do_timeout(), episode_done_cb(), experiment_done_cb(), GNUNET_ATS_TEST_experimentation_run(), GNUNET_ATS_TEST_generate_traffic_start(), GNUNET_ATS_TEST_logging_start(), GNUNET_ATS_TEST_TG_CONSTANT, GNUNET_ATS_TEST_TG_LINEAR, GNUNET_ATS_TEST_TG_RANDOM, GNUNET_ATS_TEST_TG_SINUS, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_TIME_relative_add(), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_TIME_UNIT_MINUTES, Experiment::log_freq, Experiment::max_duration, Experiment::name, Experiment::num_masters, Experiment::num_slaves, and opt_verbose.
Referenced by main().
|
static |
Definition at line 330 of file gnunet-ats-sim.c.
References GNUNET_free, GNUNET_NO, GNUNET_strdup, GNUNET_YES, opt_exp_file, opt_log, opt_plot, and opt_verbose.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 362 of file gnunet-ats-sim.c.
References Experiment::cfg_file, GNUNET_ATS_TEST_create_topology(), GNUNET_ATS_TEST_experimentation_load(), GNUNET_free, GNUNET_log_setup(), GNUNET_NO, log_request__cb(), Experiment::num_episodes, Experiment::num_masters, Experiment::num_slaves, opt_exp_file, parse_args(), and topology_setup_done().
|
static |
Definition at line 38 of file gnunet-ats-sim.c.
|
static |
Definition at line 39 of file gnunet-ats-sim.c.
|
static |
cmd option -e: experiment file
Definition at line 44 of file gnunet-ats-sim.c.
Referenced by experiment_done_cb(), main(), and parse_args().
|
static |
cmd option -l: enable logging
Definition at line 49 of file gnunet-ats-sim.c.
Referenced by experiment_done_cb(), and parse_args().
|
static |
cmd option -p: enable plots
Definition at line 54 of file gnunet-ats-sim.c.
Referenced by experiment_done_cb(), and parse_args().
|
static |
cmd option -v: verbose logs
Definition at line 59 of file gnunet-ats-sim.c.
Referenced by parse_args(), and topology_setup_done().
|
static |
Definition at line 61 of file gnunet-ats-sim.c.
|
static |
Definition at line 63 of file gnunet-ats-sim.c.
|
static |
Definition at line 65 of file gnunet-ats-sim.c.