33 #define TEST_ATS_PREFERENCE_DEFAULT 1.0 38 #define TEST_MESSAGE_TYPE_PING 12345 43 #define TEST_MESSAGE_TYPE_PONG 12346 48 #define TEST_MESSAGE_SIZE 100 531 unsigned int num_episodes;
640 unsigned int value_rate,
667 const char *testname,
710 const char *test_name,
742 unsigned int num_slaves,
743 unsigned int num_masters,
char * solver
Solver string.
struct GNUNET_ATS_TEST_Operation * next
unsigned int total_bytes_sent
Total number of bytes this peer has sent.
unsigned int messages_sent
Number of messages sent to this partner.
unsigned int total_bytes_received
Total number of bytes this peer has received.
int test_core
Test core (GNUNET_YES) or transport (GNUNET_NO)
void GNUNET_ATS_TEST_experimentation_stop(struct Experiment *e)
Stop an experiment.
struct PreferenceGenerator * next
struct GNUNET_TESTBED_Operation * comm_op
Testbed operation to connect to core.
int connected_CORE
Are we connected to all slave peers on CORE level: GNUNET_YES/NO.
struct GNUNET_TESTBED_Operation * peer_id_op
Testbed operation to get peer information.
Connect peers with testbed.
struct TrafficGenerator * next
struct GNUNET_CONFIGURATION_Handle * cfg
Handle to our configuration.
Context for the core service connection.
unsigned long long int num_masters
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...
struct GNUNET_TESTBED_Operation * ats_perf_op
Testbed operation to connect to ATS performance service.
void GNUNET_ATS_TEST_traffic_handle_ping(struct BenchmarkPartner *p)
char * testname
Preference string.
struct TrafficGenerator * prev
static int start
Set if we are to start default services (including ARM).
void GNUNET_ATS_TEST_generate_preferences_stop_all(void)
Stop all preferences generators.
void(* GNUNET_ATS_TESTING_EpisodeDoneCallback)(struct Episode *e)
struct BenchmarkPeer * GNUNET_ATS_TEST_get_peer(int src)
Topology related functions.
struct GNUNET_CORE_Handle * ch
Core handle.
double pref_bandwidth
Current preference values for bandwidth.
struct BenchmarkPartner * partners
Array of partners with num_slaves entries (if master) or num_master entries (if slave) ...
struct PreferenceGenerator * pg
Handle for preference generator.
Overall state of the performance benchmark.
struct GNUNET_TRANSPORT_CoreHandle * th
Transport handle.
unsigned int total_messages_received
Total number of messages this peer has received.
long long unsigned int src_id
void GNUNET_ATS_TEST_logging_stop(struct LoggingHandle *l)
Stop logging.
unsigned int bytes_received
Number of bytes received from this partner.
static struct Experiment * e
uint8_t padding[100 - sizeof(struct GNUNET_MessageHeader)]
void GNUNET_ATS_TEST_traffic_handle_pong(struct BenchmarkPartner *p)
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
struct GNUNET_SCHEDULER_Task * send_task
void GNUNET_ATS_TEST_logging_now(struct LoggingHandle *l)
Log all data now.
int core_connections
Number of core connections.
void GNUNET_ATS_TEST_logging_write_to_file(struct LoggingHandle *l, const char *test_name, int plots)
Write logging data to file.
struct BenchmarkPartner * GNUNET_ATS_TEST_get_partner(int src, int dest)
ATS performance characteristics for an address.
struct BenchmarkPartner * dest
struct GNUNET_SCHEDULER_Task * progress_task
Progress task.
Opaque handle to an abstract operation to be executed by the testing framework.
unsigned int total_messages_sent
Total number of messages this peer has sent.
double pref_value
Masters only Progress task.
enum GNUNET_ATS_PreferenceKind kind
struct BenchmarkPartner * dest
static struct LoggingHandle * l
struct TrafficGenerator * tg
Handle for traffic generator.
struct GNUNET_MessageHeader header
int num_partners
Number of partners.
enum State state
current state of profiling
int benchmarking
Are we connected to CORE service of all peers: GNUNET_YES/NO.
static struct GNUNET_OS_Process * p
Helper process we started.
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 ...
unsigned int total_app_rtt
Accumulated RTT for all messages.
void GNUNET_ATS_TEST_generate_traffic_stop(struct TrafficGenerator *tg)
uint32_t bandwidth_in
Bandwidth assigned inbound.
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_TEST_LogRequest ats_perf_cb)
Create a topology for ats testing.
Information we track for a peer in the testbed.
double pref_delay
Current preference values for delay.
struct PreferenceGenerator * prev
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.
int master
Is this peer a measter: GNUNET_YES/GNUNET_NO.
long long unsigned int dest_id
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.
long long unsigned int base_rate
unsigned long long int num_slaves
Information about a benchmarking partner.
unsigned int messages_received
Number of messages received from this partner.
struct GNUNET_ATS_PerformanceHandle * ats_perf_handle
ATS performance handle.
uint32_t bandwidth_out
Bandwidth assigned outbound.
static void ats_perf_cb(void *cls, const struct GNUNET_HELLO_Address *address, int active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, const struct GNUNET_ATS_Properties *prop)
Signature of a function that is called with QoS information about an address.
void GNUNET_ATS_TEST_shutdown_topology(void)
Shutdown topology.
static const char * cfg_file
Configuration filename.
int core_slave_connections
Masters only: Number of connections to slave peers.
struct LinkProperty * props
list of link properties
void GNUNET_ATS_TEST_logging_clean_up(struct LoggingHandle *l)
Stop logging.
char * pref_str
Preference string.
static struct GNUNET_TIME_Absolute start_time
Start time of the current round; used to determine how long one iteration takes (which influences how...
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.
void(* GNUNET_ATS_AddressInformationCallback)(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)
Signature of a function that is called with QoS information about an address.
An operation in an experiment.
unsigned int num_slaves
Number slave peers.
struct BenchmarkPeer * src
struct BenchmarkPeer * src
int connected_PEERS
Are we connected to all peers: GNUNET_YES/NO.
struct GNUNET_ATS_TEST_Operation * prev
struct BenchmarkPeer * sps
Array of slave peers.
struct BenchmarkPeer * mps
Array of master peers.
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
GNUNET_ATS_AddressInformationCallback ats_perf_cb
Handle to a message queue.
struct GNUNET_SCHEDULER_Task * ats_task
Masters only Progress task.
The identity of the host (wraps the signing key of the peer).
unsigned int bytes_sent
Number of bytes sent to this partner.
struct GNUNET_MQ_Handle * mq
Message queue handle.
static struct PendingResolutions * head
Head of list of pending resolution requests.
void GNUNET_ATS_TEST_generate_traffic_stop_all(void)
Stop all traffic generators.
An address for communicating with a peer.
struct GNUNET_TIME_Relative frequency
Automatic transport selection and outbound bandwidth determination.
Entry in list of pending tasks.
int connected_ATS_service
Are we connected to ATS service of all peers: GNUNET_YES/NO.
int pref_val
ATS preference value.
static struct GNUNET_TIME_Relative duration
How long do we run the test?
static struct PendingResolutions * tail
Tail of list of pending resolution requests.
struct BenchmarkPeer * pref_partner
Masters only: Peer to set ATS preferences for.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
int num_masters
Reference to perf_ats' masters.
Time for absolute times used by GNUnet, in microseconds.
GNUNET_ATS_PreferenceKind
Enum defining all known preference categories.
struct TestbedConnectOperation * core_connect_ops
Masters only: Testbed connect operations to connect masters to slaves.
void(* GNUNET_ATS_TEST_TopologySetupDoneCallback)(void *cls, struct BenchmarkPeer *masters, struct BenchmarkPeer *slaves)
Callback to call when topology setup is completed.
int connected_COMM_service
Are we connected to CORE service of all peers: GNUNET_YES/NO.
struct BenchmarkPeer * me
The peer itself this partner belongs to.
A peer controlled by the testing framework.
long long unsigned int max_rate
Handle for the transport service (includes all of the state for the transport service).
void(* GNUNET_ATS_TESTING_ExperimentDoneCallback)(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
GNUNET_ATS_TEST_TopologySetupDoneCallback done_cb
static char * address
GNS address for this phone.
unsigned int num_masters
Number master peers.
struct BenchmarkPeer * dest
The partner peer.
struct GNUNET_TESTBED_Peer * peer
Handle with testbed.
struct Experiment * GNUNET_ATS_TEST_experimentation_load(const char *filename)
Load an experiment from a file.
#define TEST_MESSAGE_SIZE
Size of test messages.
void GNUNET_ATS_TEST_generate_preferences_stop(struct PreferenceGenerator *pg)
Time for relative time used by GNUnet, in microseconds.