diff options
Diffstat (limited to 'src/ats/gnunet-ats-solver-eval.c')
-rw-r--r-- | src/ats/gnunet-ats-solver-eval.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index 5a97b2e58..3feb9b54e 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -199,6 +199,7 @@ GNUNET_ATS_solver_logging_now (struct LoggingHandle *l) | |||
199 | log_p = GNUNET_new (struct LoggingPeer); | 199 | log_p = GNUNET_new (struct LoggingPeer); |
200 | log_p->id = cur->id; | 200 | log_p->id = cur->id; |
201 | log_p->peer_id = cur->peer_id; | 201 | log_p->peer_id = cur->peer_id; |
202 | log_p->is_requested = cur->is_requested; | ||
202 | for (c = 0; c < GNUNET_ATS_PreferenceCount; c++) | 203 | for (c = 0; c < GNUNET_ATS_PreferenceCount; c++) |
203 | { | 204 | { |
204 | log_p->pref_abs[c] = cur->pref_abs[c]; | 205 | log_p->pref_abs[c] = cur->pref_abs[c]; |
@@ -383,7 +384,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
383 | GNUNET_free (filename); | 384 | GNUNET_free (filename); |
384 | GNUNET_CONTAINER_DLL_insert (lf_head, lf_tail, cur); | 385 | GNUNET_CONTAINER_DLL_insert (lf_head, lf_tail, cur); |
385 | 386 | ||
386 | GNUNET_asprintf(&datastring,"#time delta;log duration; addr net; addr_active; bw in; bw out; " \ | 387 | GNUNET_asprintf(&datastring,"#time delta;log duration;peer_requested;addr net; addr_active; bw in; bw out; " \ |
387 | "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \ | 388 | "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \ |
388 | "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;"\ | 389 | "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;"\ |
389 | "DELAY; DELAY; " \ | 390 | "DELAY; DELAY; " \ |
@@ -427,10 +428,12 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
427 | propstring = GNUNET_strdup(propstring_tmp); | 428 | propstring = GNUNET_strdup(propstring_tmp); |
428 | GNUNET_free (propstring_tmp); | 429 | GNUNET_free (propstring_tmp); |
429 | } | 430 | } |
430 | 431 | if (GNUNET_YES==log_p->is_requested) | |
431 | GNUNET_asprintf(&datastring,"%llu;%llu;%u;%i;%u;%u;%s;%s\n", | 432 | GNUNET_break (0); |
433 | GNUNET_asprintf(&datastring,"%llu;%llu;%u;%u;%i;%u;%u;%s;%s\n", | ||
432 | GNUNET_TIME_absolute_get_difference(l->head->timestamp, lts->timestamp).rel_value_us / 1000, | 434 | GNUNET_TIME_absolute_get_difference(l->head->timestamp, lts->timestamp).rel_value_us / 1000, |
433 | lts->delta, | 435 | lts->delta, |
436 | log_p->is_requested, | ||
434 | log_a->network, | 437 | log_a->network, |
435 | log_a->active, | 438 | log_a->active, |
436 | ntohl (log_a->assigned_bw_in.value__), | 439 | ntohl (log_a->assigned_bw_in.value__), |
@@ -2279,6 +2282,7 @@ enforce_start_request (struct GNUNET_ATS_TEST_Operation *op) | |||
2279 | 2282 | ||
2280 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Requesting address for peer %u\n", | 2283 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Requesting address for peer %u\n", |
2281 | op->peer_id); | 2284 | op->peer_id); |
2285 | p->is_requested = GNUNET_YES; | ||
2282 | 2286 | ||
2283 | res = sh->env.sf.s_get (sh->solver, &p->peer_id); | 2287 | res = sh->env.sf.s_get (sh->solver, &p->peer_id); |
2284 | if (NULL != res) | 2288 | if (NULL != res) |
@@ -2307,7 +2311,7 @@ enforce_stop_request (struct GNUNET_ATS_TEST_Operation *op) | |||
2307 | 2311 | ||
2308 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stop requesting address for peer %u\n", | 2312 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stop requesting address for peer %u\n", |
2309 | op->peer_id); | 2313 | op->peer_id); |
2310 | 2314 | p->is_requested = GNUNET_NO; | |
2311 | sh->env.sf.s_get_stop (sh->solver, &p->peer_id); | 2315 | sh->env.sf.s_get_stop (sh->solver, &p->peer_id); |
2312 | 2316 | ||
2313 | if (NULL != l) | 2317 | if (NULL != l) |