From 43d03abda0ffe1f39bfe4f6470ff57dc8f9bb1f3 Mon Sep 17 00:00:00 2001 From: Elias Summermatter Date: Wed, 31 Mar 2021 11:18:43 +0200 Subject: Changed perfomance setu file --- src/setu/perf_setu_api.c | 36 +++++++++++++++++++++++------------- src/util/mq.c | 2 +- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c index 710e75381..4069056fc 100644 --- a/src/setu/perf_setu_api.c +++ b/src/setu/perf_setu_api.c @@ -50,6 +50,7 @@ static int ret; static struct GNUNET_SCHEDULER_Task *tt; + static void result_cb_set1 (void *cls, const struct GNUNET_SETU_Element *element, @@ -394,25 +395,34 @@ run (void *cls, "Running real set-reconciliation\n"); //init_set1 (); // limit ~23800 element total - initRandomSets(19500,20000,20000,32); + initRandomSets(95,100,100,32); } +static void execute_perf() +{ + for( int repeat_ctr = 0; repeat_ctr<100; repeat_ctr++ ) { + + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Executing perf round %d\n", repeat_ctr); + + GNUNET_TESTING_service_run ("perf_setu_api", + "arm", + "test_setu.conf", + &run, + NULL); + } + return 0; +} + + int main (int argc, char **argv) { - GNUNET_log_setup ("test_setu_api", + GNUNET_log_setup ("perf_setu_api", "WARNING", NULL); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Launching peer\n"); - if (0 != - GNUNET_TESTING_peer_run ("test_setu_api", - "test_setu.conf", - &run, - NULL)) - { - return 1; - } - return ret; + + execute_perf(); + return 0; } diff --git a/src/util/mq.c b/src/util/mq.c index 2342b2c5c..9b59cd338 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -363,7 +363,7 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, GNUNET_assert (NULL == ev->parent_queue); mq->queue_length++; - if (mq->queue_length >= 10000) + if (mq->queue_length >= 10000000) { /* This would seem like a bug... */ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, -- cgit v1.2.3