Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc

Issue 2999073002: Tweaked version of BBR for WebRTC. (Closed)
Patch Set: Updated according to comments. Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 choke.set_capacity_kbps(1000); 116 choke.set_capacity_kbps(1000);
117 choke.set_max_delay_ms(500); 117 choke.set_max_delay_ms(500);
118 RunFor(60 * 1000); 118 RunFor(60 * 1000);
119 choke.set_capacity_kbps(500); 119 choke.set_capacity_kbps(500);
120 RunFor(60 * 1000); 120 RunFor(60 * 1000);
121 choke.set_capacity_kbps(1000); 121 choke.set_capacity_kbps(1000);
122 RunFor(60 * 1000); 122 RunFor(60 * 1000);
123 } 123 }
124 124
125 TEST_P(BweSimulation, SimulationsCompiled) {
126 AdaptiveVideoSource source(0, 30, 300, 0, 0);
127 PacedVideoSender sender(&uplink_, &source, GetParam());
128 int zero = 0;
129 DelayFilter delay(&uplink_, CreateFlowIds(&zero, 1));
130 delay.SetOneWayDelayMs(100);
131 ChokeFilter filter(&uplink_, 0);
132 RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]);
133 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true);
134 filter.set_max_delay_ms(500);
135 filter.set_capacity_kbps(1000);
136 RunFor(60 * 1000);
137 filter.set_capacity_kbps(500);
138 RunFor(50 * 1000);
139 filter.set_capacity_kbps(1000);
140 RunFor(60 * 1000);
141 filter.set_capacity_kbps(200);
142 RunFor(60 * 1000);
143 filter.set_capacity_kbps(50);
144 RunFor(60 * 1000);
145 filter.set_capacity_kbps(200);
146 RunFor(60 * 1000);
147 filter.set_capacity_kbps(500);
148 RunFor(60 * 1000);
149 filter.set_capacity_kbps(300);
150 RunFor(60 * 1000);
151 filter.set_capacity_kbps(1000);
152 RunFor(60 * 1000);
153 const int kStartingCapacityKbps = 150;
154 const int kEndingCapacityKbps = 1500;
155 const int kStepKbps = 5;
156 const int kStepTimeMs = 1000;
157 for (int i = kStartingCapacityKbps; i <= kEndingCapacityKbps;
158 i += kStepKbps) {
159 filter.set_capacity_kbps(i);
160 RunFor(kStepTimeMs);
161 }
162 for (int i = kEndingCapacityKbps; i >= kStartingCapacityKbps;
163 i -= kStepKbps) {
164 filter.set_capacity_kbps(i);
165 RunFor(kStepTimeMs);
166 }
167 filter.set_capacity_kbps(150);
168 RunFor(120 * 1000);
169 filter.set_capacity_kbps(500);
170 RunFor(60 * 1000);
171 }
172
125 TEST_P(BweSimulation, PacerChoke1000kbps500kbps1000kbps) { 173 TEST_P(BweSimulation, PacerChoke1000kbps500kbps1000kbps) {
126 AdaptiveVideoSource source(0, 30, 300, 0, 0); 174 AdaptiveVideoSource source(0, 30, 300, 0, 0);
127 PacedVideoSender sender(&uplink_, &source, GetParam()); 175 PacedVideoSender sender(&uplink_, &source, GetParam());
176 const int kFlowId = 0;
177 // CreateFlowIds() doesn't support passing int as a flow id, so we pass
178 // reference instead.
philipel 2017/08/18 11:22:14 pass pointer
gnish1 2017/08/18 11:48:42 Done.
179 DelayFilter delay(&uplink_, CreateFlowIds(&kFlowId, 1));
180 delay.SetOneWayDelayMs(100);
128 ChokeFilter filter(&uplink_, 0); 181 ChokeFilter filter(&uplink_, 0);
129 RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]); 182 RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]);
130 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); 183 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true);
131 filter.set_capacity_kbps(1000); 184 filter.set_capacity_kbps(1000);
132 filter.set_max_delay_ms(500); 185 filter.set_max_delay_ms(500);
133 RunFor(60 * 1000); 186 RunFor(60 * 1000);
134 filter.set_capacity_kbps(500); 187 filter.set_capacity_kbps(500);
135 RunFor(60 * 1000); 188 RunFor(60 * 1000);
136 filter.set_capacity_kbps(1000); 189 filter.set_capacity_kbps(1000);
137 RunFor(60 * 1000); 190 RunFor(60 * 1000);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 for (int i = kStartingCapacityKbps; i >= kEndingCapacityKbps; 308 for (int i = kStartingCapacityKbps; i >= kEndingCapacityKbps;
256 i += kStepKbps) { 309 i += kStepKbps) {
257 filter.set_capacity_kbps(i); 310 filter.set_capacity_kbps(i);
258 RunFor(kStepTimeMs); 311 RunFor(kStepTimeMs);
259 } 312 }
260 } 313 }
261 314
262 TEST_P(BweSimulation, PacerGoogleWifiTrace3Mbps) { 315 TEST_P(BweSimulation, PacerGoogleWifiTrace3Mbps) {
263 PeriodicKeyFrameSource source(0, 30, 300, 0, 0, 1000); 316 PeriodicKeyFrameSource source(0, 30, 300, 0, 0, 1000);
264 PacedVideoSender sender(&uplink_, &source, GetParam()); 317 PacedVideoSender sender(&uplink_, &source, GetParam());
318 int kFlowId = 0;
319 DelayFilter delay(&uplink_, CreateFlowIds(&kFlowId, 1));
philipel 2017/08/18 11:22:14 Add comment here as well.
gnish1 2017/08/18 11:48:42 Done.
320 delay.SetOneWayDelayMs(100);
265 RateCounterFilter counter1(&uplink_, 0, "sender_output", 321 RateCounterFilter counter1(&uplink_, 0, "sender_output",
266 bwe_names[GetParam()]); 322 bwe_names[GetParam()]);
267 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); 323 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity");
268 filter.set_max_delay_ms(500); 324 filter.set_max_delay_ms(500);
269 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]); 325 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]);
270 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); 326 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true);
271 ASSERT_TRUE(filter.Init(test::ResourcePath("google-wifi-3mbps", "rx"))); 327 ASSERT_TRUE(filter.Init(test::ResourcePath("google-wifi-3mbps", "rx")));
272 RunFor(300 * 1000); 328 RunFor(300 * 1000);
273 } 329 }
274 330
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 RunChoke(GetParam(), capacities_kbps); 541 RunChoke(GetParam(), capacities_kbps);
486 542
487 BweTest gcc_test(false); 543 BweTest gcc_test(false);
488 gcc_test.RunChoke(kSendSideEstimator, capacities_kbps); 544 gcc_test.RunChoke(kSendSideEstimator, capacities_kbps);
489 } 545 }
490 546
491 } // namespace bwe 547 } // namespace bwe
492 } // namespace testing 548 } // namespace testing
493 } // namespace webrtc 549 } // namespace webrtc
494 550
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698