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

Issue 2029593002: Update RateStatistics to handle too-little-data case. (Closed)

Created:
4 years, 6 months ago by sprang_webrtc
Modified:
4 years, 6 months ago
Reviewers:
stefan-webrtc, mflodman
CC:
webrtc-reviews_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhuangzesen_agora.io, zhengzhonghou_agora.io, tterriberry_mozilla.com, pbos-webrtc, perkj_webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Update RateStatistics to handle too-little-data case. To avoid the case where a single data point or too short window is used, causing bad behavior due to bad stats, update RateStatistics to return an Optional rather than a plain rate. There was also a strange off by one bug where the rate was slightly overestimated (N + 1 buckets, N ms time window). These changes requires updates to a number of places, and may very well cause seeming perf regressions (but the stats were probablty more wrong previously). BUG= R=mflodman@webrtc.org, stefan@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/51e60305e622f9156d37cb1f487bd4260d5ce410

Patch Set 1 #

Total comments: 18

Patch Set 2 : Addressed comments #

Patch Set 3 : Allow single data point iff full sized window #

Patch Set 4 : Fixed bug where zero rate wasn't handled correctly #

Total comments: 2

Patch Set 5 : Fixed bug when Update was not call for too long #

Total comments: 2

Patch Set 6 : Addressed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+367 lines, -130 lines) Patch
M webrtc/base/rate_statistics.h View 1 2 3 4 1 chunk +21 lines, -6 lines 0 comments Download
M webrtc/base/rate_statistics.cc View 1 2 3 4 5 2 chunks +68 lines, -37 lines 0 comments Download
M webrtc/base/rate_statistics_unittest.cc View 1 2 3 4 2 chunks +181 lines, -33 lines 0 comments Download
M webrtc/common_video/bitrate_adjuster.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M webrtc/common_video/bitrate_adjuster_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/common_video/include/bitrate_adjuster.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc View 4 chunks +8 lines, -8 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h View 2 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc View 1 3 chunks +19 lines, -4 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h View 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc View 4 chunks +30 lines, -13 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc View 1 3 chunks +22 lines, -15 lines 0 comments Download
M webrtc/video/receive_statistics_proxy.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 35 (10 generated)
sprang_webrtc
4 years, 6 months ago (2016-06-01 15:38:16 UTC) #2
stefan-webrtc
https://codereview.webrtc.org/2029593002/diff/1/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2029593002/diff/1/webrtc/base/rate_statistics.cc#newcode85 webrtc/base/rate_statistics.cc:85: // New oldest time is older than the current ...
4 years, 6 months ago (2016-06-02 07:16:42 UTC) #3
sprang_webrtc
https://codereview.webrtc.org/2029593002/diff/1/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2029593002/diff/1/webrtc/base/rate_statistics.cc#newcode85 webrtc/base/rate_statistics.cc:85: // New oldest time is older than the current ...
4 years, 6 months ago (2016-06-02 08:09:32 UTC) #4
stefan-webrtc
https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc#newcode250 webrtc/video/receive_statistics_proxy.cc:250: stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(1); On 2016/06/02 08:09:32, språng wrote: > ...
4 years, 6 months ago (2016-06-02 08:14:39 UTC) #5
sprang
https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc#newcode250 webrtc/video/receive_statistics_proxy.cc:250: stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(1); On 2016/06/02 08:14:39, stefan-webrtc (holmer) wrote: ...
4 years, 6 months ago (2016-06-02 09:00:51 UTC) #7
stefan-webrtc
https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc#newcode250 webrtc/video/receive_statistics_proxy.cc:250: stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(1); On 2016/06/02 09:00:51, sprang wrote: > ...
4 years, 6 months ago (2016-06-02 09:05:51 UTC) #8
sprang_webrtc
On 2016/06/02 09:05:51, stefan-webrtc (holmer) wrote: > https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc > File webrtc/video/receive_statistics_proxy.cc (right): > > https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc#newcode250 ...
4 years, 6 months ago (2016-06-02 09:32:57 UTC) #9
stefan-webrtc
On 2016/06/02 09:32:57, språng wrote: > On 2016/06/02 09:05:51, stefan-webrtc (holmer) wrote: > > > ...
4 years, 6 months ago (2016-06-02 09:45:26 UTC) #10
sprang_webrtc
https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2029593002/diff/1/webrtc/video/receive_statistics_proxy.cc#newcode250 webrtc/video/receive_statistics_proxy.cc:250: stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(1); On 2016/06/02 09:05:51, stefan-webrtc (holmer) wrote: ...
4 years, 6 months ago (2016-06-02 12:23:50 UTC) #11
stefan-webrtc
lgtm
4 years, 6 months ago (2016-06-02 12:40:07 UTC) #12
sprang_webrtc
+mflodman as webrtc/base owner
4 years, 6 months ago (2016-06-02 12:53:43 UTC) #13
sprang_webrtc
4 years, 6 months ago (2016-06-02 12:53:58 UTC) #15
sprang_webrtc
Ping mflodman
4 years, 6 months ago (2016-06-08 09:36:07 UTC) #18
sprang_webrtc
Actually, found a bug. stefan may want to check that out
4 years, 6 months ago (2016-06-08 11:26:40 UTC) #19
stefan-webrtc
https://codereview.webrtc.org/2029593002/diff/60001/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2029593002/diff/60001/webrtc/base/rate_statistics.cc#newcode102 webrtc/base/rate_statistics.cc:102: if (num_samples_ == 0) { Why is this any ...
4 years, 6 months ago (2016-06-08 11:32:41 UTC) #20
sprang_webrtc
https://codereview.webrtc.org/2029593002/diff/60001/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2029593002/diff/60001/webrtc/base/rate_statistics.cc#newcode102 webrtc/base/rate_statistics.cc:102: if (num_samples_ == 0) { On 2016/06/08 11:32:41, stefan-webrtc ...
4 years, 6 months ago (2016-06-08 12:07:11 UTC) #21
stefan-webrtc
lgtm
4 years, 6 months ago (2016-06-08 12:17:19 UTC) #22
sprang_webrtc
Crap, found another bug - triggered when Update() wasn't call for more than a full ...
4 years, 6 months ago (2016-06-08 12:40:20 UTC) #23
sprang_webrtc
ping?
4 years, 6 months ago (2016-06-09 11:13:44 UTC) #24
stefan-webrtc
lgtm
4 years, 6 months ago (2016-06-09 12:00:07 UTC) #25
mflodman
One comment, then LGTm for base/* https://codereview.webrtc.org/2029593002/diff/80001/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2029593002/diff/80001/webrtc/base/rate_statistics.cc#newcode88 webrtc/base/rate_statistics.cc:88: if (new_oldest_time < ...
4 years, 6 months ago (2016-06-10 12:30:49 UTC) #26
sprang_webrtc
https://codereview.webrtc.org/2029593002/diff/80001/webrtc/base/rate_statistics.cc File webrtc/base/rate_statistics.cc (right): https://codereview.webrtc.org/2029593002/diff/80001/webrtc/base/rate_statistics.cc#newcode88 webrtc/base/rate_statistics.cc:88: if (new_oldest_time < oldest_time_) On 2016/06/10 12:30:49, mflodman wrote: ...
4 years, 6 months ago (2016-06-10 13:11:22 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2029593002/100001
4 years, 6 months ago (2016-06-10 13:43:20 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_dbg/builds/14077)
4 years, 6 months ago (2016-06-10 13:50:11 UTC) #32
sprang_webrtc
4 years, 6 months ago (2016-06-10 20:13:40 UTC) #35
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
51e60305e622f9156d37cb1f487bd4260d5ce410 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698