diff options
Diffstat (limited to 'src/ats-tests/ats-testing-log.c')
-rw-r--r-- | src/ats-tests/ats-testing-log.c | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c index c3aba3f08..feba0ac51 100644 --- a/src/ats-tests/ats-testing-log.c +++ b/src/ats-tests/ats-testing-log.c | |||
@@ -121,25 +121,19 @@ struct PartnerLoggingTimestep | |||
121 | 121 | ||
122 | /* Current ATS properties */ | 122 | /* Current ATS properties */ |
123 | 123 | ||
124 | uint32_t ats_distance; | 124 | unsigned int ats_distance; |
125 | 125 | ||
126 | uint32_t ats_delay; | 126 | struct GNUNET_TIME_Relative ats_delay; |
127 | 127 | ||
128 | uint32_t bandwidth_in; | 128 | uint32_t bandwidth_in; |
129 | 129 | ||
130 | uint32_t bandwidth_out; | 130 | uint32_t bandwidth_out; |
131 | 131 | ||
132 | uint32_t ats_utilization_up; | 132 | uint32_t ats_utilization_out; |
133 | 133 | ||
134 | uint32_t ats_utilization_down; | 134 | uint32_t ats_utilization_in; |
135 | 135 | ||
136 | uint32_t ats_network_type; | 136 | enum GNUNET_ATS_Network_Type ats_network_type; |
137 | |||
138 | uint32_t ats_cost_wan; | ||
139 | |||
140 | uint32_t ats_cost_lan; | ||
141 | |||
142 | uint32_t ats_cost_wlan; | ||
143 | 137 | ||
144 | double pref_bandwidth; | 138 | double pref_bandwidth; |
145 | double pref_delay; | 139 | double pref_delay; |
@@ -541,7 +535,7 @@ GNUNET_ATS_TEST_logging_write_to_file (struct LoggingHandle *l, | |||
541 | 535 | ||
542 | /* Assembling slave string */ | 536 | /* Assembling slave string */ |
543 | GNUNET_asprintf(&data, | 537 | GNUNET_asprintf(&data, |
544 | "%llu;%llu;%u;%u;%u;%u;%u;%u;%.3f;%u;%u;%u;%u;%u;%u;%u;%u;%u;%u;%.3f;%.3f\n", | 538 | "%llu;%llu;%u;%u;%u;%u;%u;%u;%.3f;%u;%u;%u;%u;%u;%u;%u;%.3f;%.3f\n", |
545 | (long long unsigned int) cur_lt->timestamp.abs_value_us, | 539 | (long long unsigned int) cur_lt->timestamp.abs_value_us, |
546 | (long long unsigned int) GNUNET_TIME_absolute_get_difference(l->lp[c_m].start, | 540 | (long long unsigned int) GNUNET_TIME_absolute_get_difference(l->lp[c_m].start, |
547 | cur_lt->timestamp).rel_value_us / 1000, | 541 | cur_lt->timestamp).rel_value_us / 1000, |
@@ -554,20 +548,17 @@ GNUNET_ATS_TEST_logging_write_to_file (struct LoggingHandle *l, | |||
554 | (double) plt->app_rtt / 1000, | 548 | (double) plt->app_rtt / 1000, |
555 | plt->bandwidth_in, | 549 | plt->bandwidth_in, |
556 | plt->bandwidth_out, | 550 | plt->bandwidth_out, |
557 | plt->ats_cost_lan, | ||
558 | plt->ats_cost_wan, | ||
559 | plt->ats_cost_wlan, | ||
560 | plt->ats_delay, | 551 | plt->ats_delay, |
561 | plt->ats_distance, | 552 | plt->ats_distance, |
562 | plt->ats_network_type, | 553 | plt->ats_network_type, |
563 | plt->ats_utilization_up, | 554 | plt->ats_utilization_out, |
564 | plt->ats_utilization_down, | 555 | plt->ats_utilization_in, |
565 | plt->pref_bandwidth, | 556 | plt->pref_bandwidth, |
566 | plt->pref_delay); | 557 | plt->pref_delay); |
567 | 558 | ||
568 | if (l->verbose) | 559 | if (l->verbose) |
569 | fprintf (stderr, | 560 | fprintf (stderr, |
570 | "\t Slave [%u]: %u %u %u ; %u %u %u rtt %u delay %u bw_in %u bw_out %u \n", | 561 | "\t Slave [%u]: %u %u %u ; %u %u %u rtt %u delay %llu bw_in %u bw_out %u \n", |
571 | plt->slave->no, | 562 | plt->slave->no, |
572 | plt->total_messages_sent, | 563 | plt->total_messages_sent, |
573 | plt->total_bytes_sent, | 564 | plt->total_bytes_sent, |
@@ -576,7 +567,7 @@ GNUNET_ATS_TEST_logging_write_to_file (struct LoggingHandle *l, | |||
576 | plt->total_bytes_received, | 567 | plt->total_bytes_received, |
577 | plt->throughput_recv, | 568 | plt->throughput_recv, |
578 | plt->app_rtt, | 569 | plt->app_rtt, |
579 | plt->ats_delay, | 570 | (long long unsigned int) plt->ats_delay.rel_value_us, |
580 | plt->bandwidth_in, | 571 | plt->bandwidth_in, |
581 | plt->bandwidth_out); | 572 | plt->bandwidth_out); |
582 | 573 | ||
@@ -737,14 +728,11 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) | |||
737 | slt->total_messages_received = p->messages_received; | 728 | slt->total_messages_received = p->messages_received; |
738 | slt->total_app_rtt = p->total_app_rtt; | 729 | slt->total_app_rtt = p->total_app_rtt; |
739 | /* ats performance information */ | 730 | /* ats performance information */ |
740 | slt->ats_cost_lan = p->ats_cost_lan; | 731 | slt->ats_delay = p->props.delay; |
741 | slt->ats_cost_wan = p->ats_cost_wan; | 732 | slt->ats_distance = p->props.distance; |
742 | slt->ats_cost_wlan = p->ats_cost_wlan; | 733 | slt->ats_network_type = p->props.scope; |
743 | slt->ats_delay = p->ats_delay; | 734 | slt->ats_utilization_in = p->props.utilization_out; |
744 | slt->ats_distance = p->ats_distance; | 735 | slt->ats_utilization_out = p->props.utilization_out; |
745 | slt->ats_network_type = p->ats_network_type; | ||
746 | slt->ats_utilization_down = p->ats_utilization_down; | ||
747 | slt->ats_utilization_up = p->ats_utilization_up; | ||
748 | slt->bandwidth_in = p->bandwidth_in; | 736 | slt->bandwidth_in = p->bandwidth_in; |
749 | slt->bandwidth_out = p->bandwidth_out; | 737 | slt->bandwidth_out = p->bandwidth_out; |
750 | slt->pref_bandwidth = p->pref_bandwidth; | 738 | slt->pref_bandwidth = p->pref_bandwidth; |