X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fats-tests%2Fats-testing.c;h=08a61367b9796b7f86ac0445391b7870a999c689;hb=ee1c5c74a2409a52af706e613bd86a26341abba8;hp=3d090c2377d0374a5187cf569923ab222980ddb9;hpb=fa6b31337f6a83bb14586f7afa0335e559454e9e;p=oweals%2Fgnunet.git diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c index 3d090c237..08a61367b 100644 --- a/src/ats-tests/ats-testing.c +++ b/src/ats-tests/ats-testing.c @@ -19,7 +19,7 @@ */ /** * @file ats-tests/ats-testing.c - * @brief ats testing library: setup topology and provide logging to test ats + * @brief ats testing library: setup topology * solvers * @author Christian Grothoff * @author Matthias Wachs @@ -65,9 +65,6 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) int c_op; struct BenchmarkPeer *p; - if (GNUNET_YES == top->logging) - GNUNET_ATS_TEST_logging_stop (); - top->shutdown_task = GNUNET_SCHEDULER_NO_TASK; top->state.benchmarking = GNUNET_NO; @@ -544,10 +541,13 @@ do_comm_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) } static void -ats_performance_info_cb (void *cls, const struct GNUNET_HELLO_Address *address, - int address_active, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, +ats_performance_info_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_Information *ats, uint32_t ats_count) + const struct GNUNET_ATS_Information *ats, + uint32_t ats_count) { struct BenchmarkPeer *me = cls; struct BenchmarkPartner *p; @@ -630,10 +630,8 @@ ats_performance_info_cb (void *cls, const struct GNUNET_HELLO_Address *address, break; } } - if ((GNUNET_YES == top->logging) && (GNUNET_YES == log)) - GNUNET_ATS_TEST_logging_now(); - - top->ats_perf_cb (cls, address, address_active, bandwidth_out, bandwidth_in, + if (GNUNET_YES == log) + top->ats_perf_cb (cls, address, address_active, bandwidth_out, bandwidth_in, ats, ats_count); GNUNET_free(peer_id); } @@ -843,10 +841,10 @@ GNUNET_ATS_TEST_create_topology (char *name, char *cfg_file, unsigned int num_slaves, unsigned int num_masters, int test_core, - GNUNET_ATS_TESTING_TopologySetupDoneCallback done_cb, + GNUNET_ATS_TEST_TopologySetupDoneCallback done_cb, void *done_cb_cls, GNUNET_TRANSPORT_ReceiveCallback transport_recv_cb, - GNUNET_ATS_AddressInformationCallback ats_perf_cb) + GNUNET_ATS_AddressInformationCallback log_request_cb) { static struct GNUNET_CORE_MessageHandler handlers[] = { @@ -862,7 +860,7 @@ GNUNET_ATS_TEST_create_topology (char *name, char *cfg_file, top->done_cb_cls = done_cb_cls; top->test_core = test_core; top->transport_recv_cb = transport_recv_cb; - top->ats_perf_cb = ats_perf_cb; + top->ats_perf_cb = log_request_cb; top->mps = GNUNET_malloc (num_masters * sizeof (struct BenchmarkPeer)); top->sps = GNUNET_malloc (num_slaves * sizeof (struct BenchmarkPeer));