diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-07 17:06:21 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-07 17:06:21 +0000 |
commit | 87d9416ddb4d60f3ad057da83bc45f9f16cdcae2 (patch) | |
tree | 24c57dc02a1c15fa5ce9e6a8f55c8300df9ddb6c /src/ats/gnunet-ats-solver-eval.c | |
parent | 8046158a912f5f2283f2f2e821934df41d4d9b5e (diff) | |
download | gnunet-87d9416ddb4d60f3ad057da83bc45f9f16cdcae2.tar.gz gnunet-87d9416ddb4d60f3ad057da83bc45f9f16cdcae2.zip |
fixes for the logging
Diffstat (limited to 'src/ats/gnunet-ats-solver-eval.c')
-rw-r--r-- | src/ats/gnunet-ats-solver-eval.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index 9aef4245b..424605475 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -328,7 +328,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
328 | for (lts = l->head; NULL != lts; lts = lts->next) | 328 | for (lts = l->head; NULL != lts; lts = lts->next) |
329 | { | 329 | { |
330 | 330 | ||
331 | fprintf (stderr, "Writing log step %llu\n", | 331 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Writing log step %llu\n", |
332 | (long long unsigned int) lts->timestamp.abs_value_us); | 332 | (long long unsigned int) lts->timestamp.abs_value_us); |
333 | 333 | ||
334 | for (log_p = lts->head; NULL != log_p; log_p = log_p->next) | 334 | for (log_p = lts->head; NULL != log_p; log_p = log_p->next) |
@@ -383,7 +383,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
383 | GNUNET_free (filename); | 383 | GNUNET_free (filename); |
384 | GNUNET_CONTAINER_DLL_insert (lf_head, lf_tail, cur); | 384 | GNUNET_CONTAINER_DLL_insert (lf_head, lf_tail, cur); |
385 | 385 | ||
386 | GNUNET_asprintf(&datastring,"#timestamp_abs; ; addr net; addr_active; bw in; bw out; " \ | 386 | GNUNET_asprintf(&datastring,"#time delta; addr net; addr_active; bw in; bw out; " \ |
387 | "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \ | 387 | "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \ |
388 | "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;"\ | 388 | "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;"\ |
389 | "DELAY; DELAY; " \ | 389 | "DELAY; DELAY; " \ |
@@ -421,7 +421,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
421 | fprintf(stderr, "\t %s = %.2f %.2f [abs/rel]\n", | 421 | fprintf(stderr, "\t %s = %.2f %.2f [abs/rel]\n", |
422 | GNUNET_ATS_print_property_type(c), | 422 | GNUNET_ATS_print_property_type(c), |
423 | log_a->prop_abs[c], log_a->prop_norm[c]);*/ | 423 | log_a->prop_abs[c], log_a->prop_norm[c]);*/ |
424 | GNUNET_asprintf(&propstring_tmp,"%s;%.3f;%.3f", | 424 | GNUNET_asprintf(&propstring_tmp,"%s%.3f;%.3f;", |
425 | propstring, log_a->prop_abs[c], log_a->prop_norm[c]); | 425 | propstring, log_a->prop_abs[c], log_a->prop_norm[c]); |
426 | GNUNET_free (propstring); | 426 | GNUNET_free (propstring); |
427 | propstring = GNUNET_strdup(propstring_tmp); | 427 | propstring = GNUNET_strdup(propstring_tmp); |
@@ -2196,7 +2196,19 @@ enforce_stop_property (struct GNUNET_ATS_TEST_Operation *op) | |||
2196 | struct PropertyGenerator *pg = find_prop_gen(op->peer_id, op->address_id, | 2196 | struct PropertyGenerator *pg = find_prop_gen(op->peer_id, op->address_id, |
2197 | op->prop_type); | 2197 | op->prop_type); |
2198 | if (NULL != pg) | 2198 | if (NULL != pg) |
2199 | GNUNET_ATS_solver_generate_property_stop (pg); | 2199 | { |
2200 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | ||
2201 | "Stopping preference generation for peer %u address %u\n", op->peer_id, | ||
2202 | op->address_id); | ||
2203 | GNUNET_ATS_solver_generate_property_stop (pg); | ||
2204 | } | ||
2205 | else | ||
2206 | { | ||
2207 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
2208 | "Cannot find preference generator for peer %u address %u\n", | ||
2209 | op->peer_id, op->address_id); | ||
2210 | GNUNET_break (0); | ||
2211 | } | ||
2200 | } | 2212 | } |
2201 | 2213 | ||
2202 | static void | 2214 | static void |
@@ -2234,7 +2246,19 @@ enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op) | |||
2234 | struct PreferenceGenerator *pg = find_pref_gen(op->peer_id, | 2246 | struct PreferenceGenerator *pg = find_pref_gen(op->peer_id, |
2235 | op->pref_type); | 2247 | op->pref_type); |
2236 | if (NULL != pg) | 2248 | if (NULL != pg) |
2237 | GNUNET_ATS_solver_generate_preferences_stop (pg); | 2249 | { |
2250 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | ||
2251 | "Stopping property generation for peer %u address %u\n", op->peer_id, | ||
2252 | op->address_id); | ||
2253 | GNUNET_ATS_solver_generate_preferences_stop (pg); | ||
2254 | } | ||
2255 | else | ||
2256 | { | ||
2257 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
2258 | "Cannot find preference generator for peer %u address %u\n", | ||
2259 | op->peer_id, op->address_id); | ||
2260 | GNUNET_break (0); | ||
2261 | } | ||
2238 | } | 2262 | } |
2239 | 2263 | ||
2240 | 2264 | ||