diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-22 10:40:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-22 10:40:04 +0000 |
commit | 7c241d90b842906019706995a48ba93eaa7acb9e (patch) | |
tree | a81ada9bd8137347183306d9f57017c88a84a549 /src/ats-tests/ats-testing.h | |
parent | 611a4740a7425e70f073e8183f96d51fa065502d (diff) | |
download | gnunet-7c241d90b842906019706995a48ba93eaa7acb9e.tar.gz gnunet-7c241d90b842906019706995a48ba93eaa7acb9e.zip |
improvements
Diffstat (limited to 'src/ats-tests/ats-testing.h')
-rw-r--r-- | src/ats-tests/ats-testing.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/ats-tests/ats-testing.h b/src/ats-tests/ats-testing.h index ce336511e..540f2bd8c 100644 --- a/src/ats-tests/ats-testing.h +++ b/src/ats-tests/ats-testing.h | |||
@@ -18,8 +18,8 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @file ats/perf_ats.c | 21 | * @file ats-tests/ats-testing.h |
22 | * @brief ats benchmark: start peers and modify preferences, monitor change over time | 22 | * @brief ats testing library: setup topology and provide logging to test ats |
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * @author Matthias Wachs | 24 | * @author Matthias Wachs |
25 | */ | 25 | */ |
@@ -29,21 +29,7 @@ | |||
29 | #include "gnunet_ats_service.h" | 29 | #include "gnunet_ats_service.h" |
30 | #include "gnunet_core_service.h" | 30 | #include "gnunet_core_service.h" |
31 | 31 | ||
32 | #define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120) | 32 | #define TEST_ATS_PREFERENCE_DEFAULT 1.0 |
33 | #define BENCHMARK_DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) | ||
34 | #define LOGGING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 500) | ||
35 | #define TESTNAME_PREFIX "perf_ats_" | ||
36 | #define DEFAULT_SLAVES_NUM 2 | ||
37 | #define DEFAULT_MASTERS_NUM 1 | ||
38 | |||
39 | #define TEST_ATS_PREFRENCE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) | ||
40 | #define TEST_ATS_PREFRENCE_START 1.0 | ||
41 | #define TEST_ATS_PREFRENCE_DELTA 1.0 | ||
42 | |||
43 | #define TEST_MESSAGE_TYPE_PING 12345 | ||
44 | #define TEST_MESSAGE_TYPE_PONG 12346 | ||
45 | #define TEST_MESSAGE_SIZE 1000 | ||
46 | #define TEST_MESSAGE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) | ||
47 | 33 | ||
48 | /** | 34 | /** |
49 | * Overall state of the performance benchmark | 35 | * Overall state of the performance benchmark |
@@ -394,6 +380,16 @@ struct GNUNET_ATS_TEST_Topology | |||
394 | }; | 380 | }; |
395 | 381 | ||
396 | void | 382 | void |
383 | GNUNET_ATS_TEST_logging_start (struct GNUNET_TIME_Relative log_frequency, | ||
384 | char * testname, struct BenchmarkPeer *masters, int num_masters); | ||
385 | |||
386 | void | ||
387 | GNUNET_ATS_TEST_logging_now (void); | ||
388 | |||
389 | void | ||
390 | GNUNET_ATS_TEST_logging_stop (void); | ||
391 | |||
392 | void | ||
397 | GNUNET_ATS_TEST_create_topology (char *name, char *cfg_file, | 393 | GNUNET_ATS_TEST_create_topology (char *name, char *cfg_file, |
398 | unsigned int num_slaves, | 394 | unsigned int num_slaves, |
399 | unsigned int num_masters, | 395 | unsigned int num_masters, |
@@ -407,4 +403,4 @@ GNUNET_ATS_TEST_create_topology (char *name, char *cfg_file, | |||
407 | void | 403 | void |
408 | GNUNET_ATS_TEST_shutdown_topology (void); | 404 | GNUNET_ATS_TEST_shutdown_topology (void); |
409 | 405 | ||
410 | /* end of file perf_ats.c */ | 406 | /* end of file ats-testing.h */ |