From d66dde1faff7b80f4cf7b7c15f1bcab1210fa13c Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 25 Mar 2011 16:40:48 +0000 Subject: [PATCH] reduce exec frequency --- src/transport/gnunet-service-transport.c | 9 ++++++--- src/transport/transport.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 191689d98..8c7906a71 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -48,8 +48,8 @@ #define DEBUG_TRANSPORT_HELLO GNUNET_YES -#define DEBUG_ATS GNUNET_YES -#define VERBOSE_ATS GNUNET_YES +#define DEBUG_ATS GNUNET_NO +#define VERBOSE_ATS GNUNET_NO /** * Should we do some additional checks (to validate behavior @@ -5711,8 +5711,10 @@ ats_create_problem (int peers, glp_load_matrix(lp, rows * cols, ia, ja, ar); /* Solve the MLP problem */ + if (mlp == GNUNET_YES) { +#if 0 glp_iocp opt; glp_init_iocp(&opt); @@ -5726,6 +5728,7 @@ ats_create_problem (int peers, else opt.msg_lev = GLP_MSG_OFF; result = glp_intopt(lp, &opt); +#endif } /* Solve the LP problem */ { @@ -5736,7 +5739,7 @@ ats_create_problem (int peers, opt.it_lim = max_it; /* maximum duration */ opt.tm_lim = max_dur; - opt.presolve =GLP_ON; + opt.presolve = GLP_ON; /* output level */ if (VERBOSE_ATS) opt.msg_lev = GLP_MSG_ALL; diff --git a/src/transport/transport.h b/src/transport/transport.h index 3d6890997..dd6965a61 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -31,7 +31,7 @@ #include "gnunet_transport_service.h" /* Minimum time between to calculations*/ -#define ATS_MIN_INTERVAL GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 1000) +#define ATS_MIN_INTERVAL GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 20) #define ATS_EXEC_INTERVAL GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 60) #define ATS_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 500) #define ATS_MAX_ITERATIONS INT_MAX -- 2.25.1