X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fats-tests%2Fperf_ats.h;h=cad194313639e6f860eaab5830e2d10e7e818ada;hb=d06a3e6becaaa64d744303e14a13974f9b7e5bc8;hp=e2525a0daf297b5fd88b19f9b4fec9ffedb52c16;hpb=33d7922f5f3ebbf4239f105b7cf030f3e3cc7733;p=oweals%2Fgnunet.git diff --git a/src/ats-tests/perf_ats.h b/src/ats-tests/perf_ats.h index e2525a0da..cad194313 100644 --- a/src/ats-tests/perf_ats.h +++ b/src/ats-tests/perf_ats.h @@ -28,11 +28,13 @@ #include "gnunet_testbed_service.h" #include "gnunet_ats_service.h" #include "gnunet_core_service.h" +#include "ats-testing.h" -#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) +#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120) #define BENCHMARK_DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) +#define LOGGING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 500) #define TESTNAME_PREFIX "perf_ats_" -#define DEFAULT_SLAVES_NUM 3 +#define DEFAULT_SLAVES_NUM 2 #define DEFAULT_MASTERS_NUM 1 #define TEST_ATS_PREFRENCE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) @@ -69,6 +71,16 @@ struct BenchmarkPartner */ struct GNUNET_TRANSPORT_TransmitHandle *tth; + /** + * Timestamp to calculate communication layer delay + */ + struct GNUNET_TIME_Absolute last_message_sent; + + /** + * Accumulated RTT for all messages + */ + unsigned int total_app_rtt; + /** * Number of messages sent to this partner */ @@ -88,6 +100,28 @@ struct BenchmarkPartner * Number of bytes received from this partner */ unsigned int bytes_received; + + /* Current ATS properties */ + + uint32_t ats_distance; + + uint32_t ats_delay; + + uint32_t bandwidth_in; + + uint32_t bandwidth_out; + + uint32_t ats_utilization_up; + + uint32_t ats_utilization_down; + + uint32_t ats_network_type; + + uint32_t ats_cost_wan; + + uint32_t ats_cost_lan; + + uint32_t ats_cost_wlan; }; @@ -214,11 +248,4 @@ struct BenchmarkPeer }; -void -perf_logging_stop (); - -void -perf_logging_start (char * testname, struct BenchmarkPeer *masters, int num_masters); - - /* end of file perf_ats.h */