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

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 // CreateFlowIds() doesn't support passing int as a flow id, so we pass
130 // pointer instead.
131 DelayFilter delay(&uplink_, CreateFlowIds(&zero, 1));
132 delay.SetOneWayDelayMs(100);
133 ChokeFilter filter(&uplink_, 0);
134 RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]);
135 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true);
136 filter.set_max_delay_ms(500);
137 filter.set_capacity_kbps(1000);
138 RunFor(60 * 1000);
139 filter.set_capacity_kbps(500);
140 RunFor(50 * 1000);
141 filter.set_capacity_kbps(1000);
142 RunFor(60 * 1000);
143 filter.set_capacity_kbps(200);
144 RunFor(60 * 1000);
145 filter.set_capacity_kbps(50);
146 RunFor(60 * 1000);
147 filter.set_capacity_kbps(200);
148 RunFor(60 * 1000);
149 filter.set_capacity_kbps(500);
150 RunFor(60 * 1000);
151 filter.set_capacity_kbps(300);
152 RunFor(60 * 1000);
153 filter.set_capacity_kbps(1000);
154 RunFor(60 * 1000);
155 const int kStartingCapacityKbps = 150;
156 const int kEndingCapacityKbps = 1500;
157 const int kStepKbps = 5;
158 const int kStepTimeMs = 1000;
159 for (int i = kStartingCapacityKbps; i <= kEndingCapacityKbps;
160 i += kStepKbps) {
161 filter.set_capacity_kbps(i);
162 RunFor(kStepTimeMs);
163 }
164 for (int i = kEndingCapacityKbps; i >= kStartingCapacityKbps;
165 i -= kStepKbps) {
166 filter.set_capacity_kbps(i);
167 RunFor(kStepTimeMs);
168 }
169 filter.set_capacity_kbps(150);
170 RunFor(120 * 1000);
171 filter.set_capacity_kbps(500);
172 RunFor(60 * 1000);
173 }
174
125 TEST_P(BweSimulation, PacerChoke1000kbps500kbps1000kbps) { 175 TEST_P(BweSimulation, PacerChoke1000kbps500kbps1000kbps) {
126 AdaptiveVideoSource source(0, 30, 300, 0, 0); 176 AdaptiveVideoSource source(0, 30, 300, 0, 0);
127 PacedVideoSender sender(&uplink_, &source, GetParam()); 177 PacedVideoSender sender(&uplink_, &source, GetParam());
178 const int kFlowId = 0;
179 // CreateFlowIds() doesn't support passing int as a flow id, so we pass
180 // pointer instead.
181 DelayFilter delay(&uplink_, CreateFlowIds(&kFlowId, 1));
182 delay.SetOneWayDelayMs(100);
128 ChokeFilter filter(&uplink_, 0); 183 ChokeFilter filter(&uplink_, 0);
129 RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]); 184 RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]);
130 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); 185 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true);
131 filter.set_capacity_kbps(1000); 186 filter.set_capacity_kbps(1000);
132 filter.set_max_delay_ms(500); 187 filter.set_max_delay_ms(500);
133 RunFor(60 * 1000); 188 RunFor(60 * 1000);
134 filter.set_capacity_kbps(500); 189 filter.set_capacity_kbps(500);
135 RunFor(60 * 1000); 190 RunFor(60 * 1000);
136 filter.set_capacity_kbps(1000); 191 filter.set_capacity_kbps(1000);
137 RunFor(60 * 1000); 192 RunFor(60 * 1000);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 for (int i = kStartingCapacityKbps; i >= kEndingCapacityKbps; 310 for (int i = kStartingCapacityKbps; i >= kEndingCapacityKbps;
256 i += kStepKbps) { 311 i += kStepKbps) {
257 filter.set_capacity_kbps(i); 312 filter.set_capacity_kbps(i);
258 RunFor(kStepTimeMs); 313 RunFor(kStepTimeMs);
259 } 314 }
260 } 315 }
261 316
262 TEST_P(BweSimulation, PacerGoogleWifiTrace3Mbps) { 317 TEST_P(BweSimulation, PacerGoogleWifiTrace3Mbps) {
263 PeriodicKeyFrameSource source(0, 30, 300, 0, 0, 1000); 318 PeriodicKeyFrameSource source(0, 30, 300, 0, 0, 1000);
264 PacedVideoSender sender(&uplink_, &source, GetParam()); 319 PacedVideoSender sender(&uplink_, &source, GetParam());
320 int kFlowId = 0;
321 // CreateFlowIds() doesn't support passing int as a flow id, so we pass
322 // pointer instead.
323 DelayFilter delay(&uplink_, CreateFlowIds(&kFlowId, 1));
324 delay.SetOneWayDelayMs(100);
265 RateCounterFilter counter1(&uplink_, 0, "sender_output", 325 RateCounterFilter counter1(&uplink_, 0, "sender_output",
266 bwe_names[GetParam()]); 326 bwe_names[GetParam()]);
267 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); 327 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity");
268 filter.set_max_delay_ms(500); 328 filter.set_max_delay_ms(500);
269 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]); 329 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]);
270 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); 330 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true);
271 ASSERT_TRUE(filter.Init(test::ResourcePath("google-wifi-3mbps", "rx"))); 331 ASSERT_TRUE(filter.Init(test::ResourcePath("google-wifi-3mbps", "rx")));
272 RunFor(300 * 1000); 332 RunFor(300 * 1000);
273 } 333 }
274 334
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 RunChoke(GetParam(), capacities_kbps); 545 RunChoke(GetParam(), capacities_kbps);
486 546
487 BweTest gcc_test(false); 547 BweTest gcc_test(false);
488 gcc_test.RunChoke(kSendSideEstimator, capacities_kbps); 548 gcc_test.RunChoke(kSendSideEstimator, capacities_kbps);
489 } 549 }
490 550
491 } // namespace bwe 551 } // namespace bwe
492 } // namespace testing 552 } // namespace testing
493 } // namespace webrtc 553 } // namespace webrtc
494 554
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/BUILD.gn ('k') | webrtc/modules/remote_bitrate_estimator/test/bbr_paced_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698