![]() |
GNUnet
0.11.x
|
ats benchmark: traffic generator More...
Go to the source code of this file.
Functions | |
static struct GNUNET_TIME_Relative | get_delay (struct TrafficGenerator *tg) |
static void | update_ping_data (void *cls) |
static void | comm_schedule_send (void *cls) |
static void | update_pong_data (void *cls) |
void | GNUNET_ATS_TEST_traffic_handle_ping (struct BenchmarkPartner *p) |
void | GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p) |
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. More... | |
void | GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg) |
void | GNUNET_ATS_TEST_generate_traffic_stop_all () |
Stop all traffic generators. More... | |
Variables | |
static struct TrafficGenerator * | tg_head |
static struct TrafficGenerator * | tg_tail |
struct GNUNET_ATS_TEST_Topology * | top |
ats benchmark: traffic generator
Definition in file ats-testing-traffic.c.
|
static |
Definition at line 36 of file ats-testing-traffic.c.
References delay, GNUNET_ATS_TEST_TG_CONSTANT, GNUNET_ATS_TEST_TG_LINEAR, GNUNET_ATS_TEST_TG_RANDOM, GNUNET_ATS_TEST_TG_SINUS, GNUNET_break, GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_CRYPTO_random_u32(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_TIME_absolute_get_duration(), GNUNET_TIME_UNIT_SECONDS, GNUNET_TIME_UNIT_ZERO, GNUNET_TIME_Relative::rel_value_us, and TEST_MESSAGE_SIZE.
Referenced by update_ping_data().
|
static |
Definition at line 118 of file ats-testing-traffic.c.
References BenchmarkPartner::bytes_sent, get_delay(), GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_add(), GNUNET_TIME_absolute_get(), GNUNET_YES, BenchmarkPartner::me, BenchmarkPartner::messages_sent, TrafficGenerator::next_ping_transmission, p, TEST_MESSAGE_SIZE, BenchmarkPartner::tg, BenchmarkPeer::total_bytes_sent, and BenchmarkPeer::total_messages_sent.
Referenced by comm_schedule_send().
|
static |
Definition at line 145 of file ats-testing-traffic.c.
References BenchmarkPartner::dest, env, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MQ_msg, GNUNET_MQ_notify_sent(), GNUNET_MQ_send(), GNUNET_TIME_absolute_get(), BenchmarkPartner::last_message_sent, BenchmarkPartner::me, BenchmarkPartner::mq, msg, BenchmarkPeer::no, p, TestMessage::padding, TrafficGenerator::send_task, TEST_MESSAGE_TYPE_PING, BenchmarkPartner::tg, and update_ping_data().
Referenced by GNUNET_ATS_TEST_generate_traffic_start(), and GNUNET_ATS_TEST_traffic_handle_pong().
|
static |
Definition at line 171 of file ats-testing-traffic.c.
References BenchmarkPartner::bytes_sent, BenchmarkPartner::me, BenchmarkPartner::messages_sent, p, TEST_MESSAGE_SIZE, BenchmarkPeer::total_bytes_sent, and BenchmarkPeer::total_messages_sent.
Referenced by GNUNET_ATS_TEST_traffic_handle_ping().
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().
|
static |
Definition at line 30 of file ats-testing-traffic.c.
Referenced by GNUNET_ATS_TEST_generate_traffic_stop_all().
|
static |
Definition at line 31 of file ats-testing-traffic.c.
struct GNUNET_ATS_TEST_Topology* top |
Definition at line 53 of file ats-testing.c.