diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-04-30 13:57:52 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-04-30 13:57:52 +0000 |
commit | 104c0773ca81e2435d8c973517db23386188bdc0 (patch) | |
tree | 892f669370304191798e7f0794d8596c3a2afa4c /src | |
parent | 991c10a24a9f3325ed1e6dfabf1e3df21cd5840c (diff) | |
download | gnunet-104c0773ca81e2435d8c973517db23386188bdc0.tar.gz gnunet-104c0773ca81e2435d8c973517db23386188bdc0.zip |
minor changes
Diffstat (limited to 'src')
-rw-r--r-- | src/ats/gnunet-ats-solver-eval.c | 12 | ||||
-rw-r--r-- | src/ats/perf_ats_solver.c | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index 06c4d3464..a974962b8 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -382,16 +382,12 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
382 | GNUNET_free (filename); | 382 | GNUNET_free (filename); |
383 | GNUNET_CONTAINER_DLL_insert (lf_head, lf_tail, cur); | 383 | GNUNET_CONTAINER_DLL_insert (lf_head, lf_tail, cur); |
384 | 384 | ||
385 | GNUNET_asprintf(&datastring,"#timestamp_abs; addr net; addr_active; bw in; bw out; " \ | 385 | GNUNET_asprintf(&datastring,"#timestamp_abs; ; addr net; addr_active; bw in; bw out; " \ |
386 | "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \ | 386 | "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \ |
387 | "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;"\ | 387 | "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;"\ |
388 | "DELAY; DELAY; " \ | 388 | "DELAY; DELAY; " \ |
389 | "DISTANCE ;DISTANCE ; COST_WAN; COST_WAN; COST_LAN; COST_LAN; " \ | 389 | "DISTANCE ;DISTANCE ; COST_WAN; COST_WAN; COST_LAN; COST_LAN; " \ |
390 | "COST_WLAN; COST_WLAN; PREF BW abs; PREF BW rel; PREF LATENCY abs; PREF LATENCY rel;\n", | 390 | "COST_WLAN; COST_WLAN; PREF BW abs; PREF BW rel; PREF LATENCY abs; PREF LATENCY rel;\n"); |
391 | lts->timestamp.abs_value_us, | ||
392 | log_a->active, | ||
393 | ntohl (log_a->assigned_bw_in.value__), | ||
394 | ntohl (log_a->assigned_bw_out.value__)); | ||
395 | GNUNET_DISK_file_write (cur->f_hd, datastring, strlen(datastring)); | 391 | GNUNET_DISK_file_write (cur->f_hd, datastring, strlen(datastring)); |
396 | GNUNET_free (datastring); | 392 | GNUNET_free (datastring); |
397 | 393 | ||
@@ -405,7 +401,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
405 | GNUNET_ATS_print_preference_type(c), | 401 | GNUNET_ATS_print_preference_type(c), |
406 | log_p->pref_abs[c], log_p->pref_norm[c]); | 402 | log_p->pref_abs[c], log_p->pref_norm[c]); |
407 | */ | 403 | */ |
408 | GNUNET_asprintf(&prefstring_tmp,"%s|%.3f|%.3f", | 404 | GNUNET_asprintf(&prefstring_tmp,"%s;%.3f;%.3f", |
409 | prefstring, log_p->pref_abs[c], log_p->pref_norm[c]); | 405 | prefstring, log_p->pref_abs[c], log_p->pref_norm[c]); |
410 | 406 | ||
411 | 407 | ||
@@ -432,7 +428,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int add_time_s | |||
432 | } | 428 | } |
433 | 429 | ||
434 | GNUNET_asprintf(&datastring,"%llu;%u;%i;%u;%u;%s;%s\n", | 430 | GNUNET_asprintf(&datastring,"%llu;%u;%i;%u;%u;%s;%s\n", |
435 | lts->timestamp.abs_value_us, | 431 | GNUNET_TIME_absolute_get_difference(l->head->timestamp, lts->timestamp).rel_value_us / 1000, |
436 | log_a->network, | 432 | log_a->network, |
437 | log_a->active, | 433 | log_a->active, |
438 | ntohl (log_a->assigned_bw_in.value__), | 434 | ntohl (log_a->assigned_bw_in.value__), |
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c index 1b804d693..7d29e4b64 100644 --- a/src/ats/perf_ats_solver.c +++ b/src/ats/perf_ats_solver.c | |||
@@ -1659,8 +1659,10 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
1659 | /* Do the benchmark */ | 1659 | /* Do the benchmark */ |
1660 | for (ph.current_iteration = 1; ph.current_iteration <= ph.total_iterations; ph.current_iteration++) | 1660 | for (ph.current_iteration = 1; ph.current_iteration <= ph.total_iterations; ph.current_iteration++) |
1661 | { | 1661 | { |
1662 | fprintf (stderr, "Iteration %u of %u starting\n", ph.current_iteration, ph.total_iterations); | ||
1662 | perf_run_iteration (); | 1663 | perf_run_iteration (); |
1663 | evaluate (ph.current_iteration); | 1664 | evaluate (ph.current_iteration); |
1665 | fprintf (stderr, "Iteration %u of %u done\n", ph.current_iteration, ph.total_iterations); | ||
1664 | } | 1666 | } |
1665 | evaluate_average (); | 1667 | evaluate_average (); |
1666 | 1668 | ||