| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 void BweTest::VerboseLogging(bool enable) { | 161 void BweTest::VerboseLogging(bool enable) { |
| 162 BWE_TEST_LOGGING_GLOBAL_ENABLE(enable); | 162 BWE_TEST_LOGGING_GLOBAL_ENABLE(enable); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void BweTest::RunFor(int64_t time_ms) { | 165 void BweTest::RunFor(int64_t time_ms) { |
| 166 // Set simulation interval from first packet sender. | 166 // Set simulation interval from first packet sender. |
| 167 // TODO(holmer): Support different feedback intervals for different flows. | 167 // TODO(holmer): Support different feedback intervals for different flows. |
| 168 | 168 |
| 169 // For quick perf tests ignore passed timeout | 169 // For quick perf tests ignore passed timeout |
| 170 if (field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled") { | 170 if (field_trial::IsEnabled("WebRTC-QuickPerfTest")) { |
| 171 time_ms = kQuickTestTimeoutMs; | 171 time_ms = kQuickTestTimeoutMs; |
| 172 } | 172 } |
| 173 if (!uplink_.senders().empty()) { | 173 if (!uplink_.senders().empty()) { |
| 174 simulation_interval_ms_ = uplink_.senders()[0]->GetFeedbackIntervalMs(); | 174 simulation_interval_ms_ = uplink_.senders()[0]->GetFeedbackIntervalMs(); |
| 175 } else if (!downlink_.senders().empty()) { | 175 } else if (!downlink_.senders().empty()) { |
| 176 simulation_interval_ms_ = downlink_.senders()[0]->GetFeedbackIntervalMs(); | 176 simulation_interval_ms_ = downlink_.senders()[0]->GetFeedbackIntervalMs(); |
| 177 } | 177 } |
| 178 assert(simulation_interval_ms_ > 0); | 178 assert(simulation_interval_ms_ > 0); |
| 179 if (time_now_ms_ == -1) { | 179 if (time_now_ms_ == -1) { |
| 180 time_now_ms_ = simulation_interval_ms_; | 180 time_now_ms_ = simulation_interval_ms_; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 std::map<int, Stats<double>> flow_delay_ms; | 374 std::map<int, Stats<double>> flow_delay_ms; |
| 375 for (PacketReceiver* receiver : receivers) { | 375 for (PacketReceiver* receiver : receivers) { |
| 376 int flow_id = *receiver->flow_ids().begin(); | 376 int flow_id = *receiver->flow_ids().begin(); |
| 377 flow_delay_ms[flow_id] = receiver->GetDelayStats(); | 377 flow_delay_ms[flow_id] = receiver->GetDelayStats(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 PrintResults(capacity_kbps, total_utilization.GetBitrateStats(), | 380 PrintResults(capacity_kbps, total_utilization.GetBitrateStats(), |
| 381 flow_delay_ms, flow_throughput_kbps); | 381 flow_delay_ms, flow_throughput_kbps); |
| 382 | 382 |
| 383 if (field_trial::FindFullName("WebRTC-QuickPerfTest") != "Enabled") { | 383 if (field_trial::IsEnabled("WebRTC-QuickPerfTest")) { |
| 384 for (int i : all_flow_ids) { | 384 for (int i : all_flow_ids) { |
| 385 metric_recorders[i]->PlotThroughputHistogram( | 385 metric_recorders[i]->PlotThroughputHistogram( |
| 386 title, flow_name, static_cast<int>(num_media_flows), 0); | 386 title, flow_name, static_cast<int>(num_media_flows), 0); |
| 387 | 387 |
| 388 metric_recorders[i]->PlotLossHistogram(title, flow_name, | 388 metric_recorders[i]->PlotLossHistogram(title, flow_name, |
| 389 static_cast<int>(num_media_flows), | 389 static_cast<int>(num_media_flows), |
| 390 receivers[i]->GlobalPacketLoss()); | 390 receivers[i]->GlobalPacketLoss()); |
| 391 } | 391 } |
| 392 | 392 |
| 393 // Pointless to show delay histogram for TCP flow. | 393 // Pointless to show delay histogram for TCP flow. |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 tcp_starting_times_ms.push_back( | 986 tcp_starting_times_ms.push_back( |
| 987 static_cast<int64_t>(random.Exponential(1.0f / kMeanMs))); | 987 static_cast<int64_t>(random.Exponential(1.0f / kMeanMs))); |
| 988 } | 988 } |
| 989 | 989 |
| 990 return tcp_starting_times_ms; | 990 return tcp_starting_times_ms; |
| 991 } | 991 } |
| 992 | 992 |
| 993 } // namespace bwe | 993 } // namespace bwe |
| 994 } // namespace testing | 994 } // namespace testing |
| 995 } // namespace webrtc | 995 } // namespace webrtc |
| OLD | NEW |