New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 627816 link

Starred by 11 users

Issue metadata

Status: Duplicate
Merged: issue webrtc:7060
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment

RTCPeerConnection.getStats is not like the spec

Project Member Reported by hbos@chromium.org, Jul 13 2016

Issue description

The WebRTC spec[1] and WebRTC statistics API spec[2] define RTCPeerConnection.getStats and related interfaces and dictionaries. This diagram[3] shows approximately how the new stats dictionaries look.

The current getStats is very different from the spec, see [4].
There is also a legacy version of getStats defined by the spec that we never supported that looks similar to the new getStats but with callback functions instead of promise. (Since this version never existed, perhaps we shouldn't add it now either?)

[1] https://www.w3.org/TR/2016/WD-webrtc-20160531/#sec.stats-model
[2] https://www.w3.org/TR/2016/WD-webrtc-stats-20160527/
[3] https://g3doc.corp.google.com/media/webrtc/g3doc/chameleon/design/webrtc-stats.png?cl=head
[3] https://docs.google.com/document/d/1TwAVUhr37iDO0AZk-cB_jEovjxBNgE2al45pdulSrT8/edit

The RTCStatsReport that exists today is more like what the spec calls RTCStats, and RTCStatsReport according to the spec is a map of strings and RTCStats (similar to today's RTCStatsResponse).

We should probably migrate existing stats to RTCStats or RTCStats-derived dictionaries.
The spec mandates a lot of new stats are added.
 
Showing comments 44 - 143 of 143 Older
Project Member

Comment 45 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/432e9601d9104b5fa560a96eb598e7415a87e7c0

commit 432e9601d9104b5fa560a96eb598e7415a87e7c0
Author: hbos <hbos@chromium.org>
Date: Tue Oct 04 11:47:32 2016

Prep-CL for adding new RTCStatsMeember types in WebRTC repo.

If-statement prevents a crash in a unittest that would occur if rolling
after the WebRTC change.

The WebRTC change: https://codereview.webrtc.org/2387343002/

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2390743003
Cr-Commit-Position: refs/heads/master@{#422758}

[modify] https://crrev.com/432e9601d9104b5fa560a96eb598e7415a87e7c0/content/renderer/media/rtc_peer_connection_handler_unittest.cc

Project Member

Comment 46 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/b20f38792ee87d76a0c4a47e05fbd9a8a8789c29

commit b20f38792ee87d76a0c4a47e05fbd9a8a8789c29
Author: hbos <hbos@webrtc.org>
Date: Tue Oct 04 21:37:11 2016

RTCStatsMember<bool> and RTCStatsMember<std::vector<bool>> added.
RTCStatsMemberInterface::Type's kBool and kSequenceBool.

This means that RTCStats-derived classes ("RTCStats-derived
dictionaries"[1]) can contain boolean and sequence of boolean members.

[1] https://w3c.github.io/webrtc-stats/

BUG= chromium:627816 
NOTRY=True

Review-Url: https://codereview.webrtc.org/2387343002
Cr-Commit-Position: refs/heads/master@{#14509}

[modify] https://crrev.com/b20f38792ee87d76a0c4a47e05fbd9a8a8789c29/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/b20f38792ee87d76a0c4a47e05fbd9a8a8789c29/webrtc/stats/rtcstats.cc
[modify] https://crrev.com/b20f38792ee87d76a0c4a47e05fbd9a8a8789c29/webrtc/stats/rtcstats_unittest.cc
[modify] https://crrev.com/b20f38792ee87d76a0c4a47e05fbd9a8a8789c29/webrtc/stats/test/rtcteststats.cc
[modify] https://crrev.com/b20f38792ee87d76a0c4a47e05fbd9a8a8789c29/webrtc/stats/test/rtcteststats.h

Project Member

Comment 47 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/fc5e0504ea0dd341046779881908d4640617a2f0

commit fc5e0504ea0dd341046779881908d4640617a2f0
Author: hbos <hbos@webrtc.org>
Date: Thu Oct 06 09:06:10 2016

rtc_stats: Update code to remove chromium style warnings suppression.

The warning previously suppressed made it possible to define tings like
constructors in the header, and "complex" objects did not need to have
an explicit out-of-line copy constructor, destructor, etc.

To be able to not suppress this warning, the RTCStats macro was split
into a WEBRTC_RTCSTATS_DECL() and WEBRTC_RTCSTATS_IMPL() for .h and .cc
respectively. Some copy constructors are also defined.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2373503002
Cr-Commit-Position: refs/heads/master@{#14545}

[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/stats/BUILD.gn
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/stats/rtcstats_objects.cc
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/stats/rtcstats_unittest.cc
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/stats/rtcstatsreport_unittest.cc
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/stats/test/rtcteststats.cc
[modify] https://crrev.com/fc5e0504ea0dd341046779881908d4640617a2f0/webrtc/stats/test/rtcteststats.h

Project Member

Comment 49 by bugdroid1@chromium.org, Oct 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7

commit b8c226e007d63aa93bda532cb1ed2ebc9c3292b7
Author: hbos <hbos@chromium.org>
Date: Mon Oct 10 17:43:43 2016

WebRTCStatsMember: Support for bool and sequence of bool.

Allows RTCStats[1] dictionaries to contain "boolean" and
"sequence<boolean>".
This is a follow-up surfacing the bool types added in WebRTC-CL:
https://codereview.webrtc.org/2387343002/

[1] https://w3c.github.io/webrtc-stats/

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2395503002
Cr-Commit-Position: refs/heads/master@{#424180}

[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/components/test_runner/mock_webrtc_peer_connection_handler.cc
[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/content/renderer/media/rtc_peer_connection_handler_unittest.cc
[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/content/renderer/media/webrtc/rtc_stats.cc
[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/content/renderer/media/webrtc/rtc_stats.h
[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-getStats-promise.html
[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/third_party/WebKit/Source/modules/peerconnection/RTCStatsReport.cpp
[modify] https://crrev.com/b8c226e007d63aa93bda532cb1ed2ebc9c3292b7/third_party/WebKit/public/platform/WebRTCStats.h

Comment 51 by hbos@chromium.org, Oct 12 2016

Blockedon: 654927

Comment 53 by hta@webrtc.org, Oct 17 2016

Blocking: webrtc:2031

Comment 55 by hbos@chromium.org, Oct 20 2016

Blockedon: 653873

Comment 56 by hbos@chromium.org, Oct 20 2016

Blockedon: 657854

Comment 57 by hbos@chromium.org, Oct 20 2016

Blockedon: 657855

Comment 58 by hbos@chromium.org, Oct 20 2016

Blockedon: 657856
Project Member

Comment 60 by bugdroid1@chromium.org, Oct 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/5d79a7cb1f74673daf827e38ec3778c727b4b400

commit 5d79a7cb1f74673daf827e38ec3778c727b4b400
Author: hbos <hbos@webrtc.org>
Date: Mon Oct 24 16:27:10 2016

rtcstats_objects.h updated with TODOs about stats not being collected
or not being collected correctly.

These TODOs are already documented and in greater detail in
rtcstatscollector.cc, but if every discrepency is listed in
rtcstats_objects.h it is easier to get an overview of the progress of
the new GetStats API.

BUG= chromium:627816 
TBR=hta@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2443163002
Cr-Commit-Position: refs/heads/master@{#14749}

[modify] https://crrev.com/5d79a7cb1f74673daf827e38ec3778c727b4b400/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/5d79a7cb1f74673daf827e38ec3778c727b4b400/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/5d79a7cb1f74673daf827e38ec3778c727b4b400/webrtc/api/stats/rtcstats_objects.h

Project Member

Comment 61 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/67c8bc4bf2cc10669e5cb7fd461469f30edcaa23

commit 67c8bc4bf2cc10669e5cb7fd461469f30edcaa23
Author: hbos <hbos@webrtc.org>
Date: Tue Oct 25 11:31:23 2016

RTCStats equality operator added.

This will be helpful in unittests to EXPECT_EQ reports. It should be a
useful operator to have outside of testing as well.

BUG= chromium:627816 
NOTRY=True

Review-Url: https://codereview.webrtc.org/2441543002
Cr-Commit-Position: refs/heads/master@{#14767}

[modify] https://crrev.com/67c8bc4bf2cc10669e5cb7fd461469f30edcaa23/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/67c8bc4bf2cc10669e5cb7fd461469f30edcaa23/webrtc/stats/rtcstats.cc
[modify] https://crrev.com/67c8bc4bf2cc10669e5cb7fd461469f30edcaa23/webrtc/stats/rtcstats_unittest.cc

Comment 62 by hbos@chromium.org, Oct 25 2016

Blockedon: 659117

Comment 63 by hbos@chromium.org, Oct 25 2016

Blockedon: 659137
Project Member

Comment 64 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/da389e351878d046f9eb6f305f04537774375f27

commit da389e351878d046f9eb6f305f04537774375f27
Author: hbos <hbos@webrtc.org>
Date: Tue Oct 25 17:55:08 2016

PrintTo functions for RTCStats added in rtcstatscollector_unittest.cc

Future test code will do stuff like EXPECT_EQ(report, expected_report).
They're all defined in the unittest because it and stats' operator==
is only used for testing.

See https://cs.chromium.org/chromium/src/testing/gtest/include/gtest/gtest-printers.h?sq=package:chromium&dr=C&rcl=1477394469&l=707

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2445343003
Cr-Commit-Position: refs/heads/master@{#14779}

[modify] https://crrev.com/da389e351878d046f9eb6f305f04537774375f27/webrtc/api/rtcstatscollector_unittest.cc

Comment 65 by hbos@chromium.org, Oct 31 2016

Blockedon: 660827

Comment 66 by hbos@chromium.org, Oct 31 2016

Labels: -M-56 M-57
Project Member

Comment 67 by bugdroid1@chromium.org, Oct 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29

commit 69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29
Author: hbos <hbos@webrtc.org>
Date: Mon Oct 31 21:48:26 2016

RTCOutboundRTPStreamStats[1] added.

This also adds RTCRTPStreamStats[2] which it derives from. Not all stats
are supported in this CL, this must be addressed before closing the
issue.

RTCStatsReport also gets a timestamp and ToString.

[1] https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
[2] https://w3c.github.io/webrtc-stats/#streamstats-dict*

BUG= chromium:627816 ,  chromium:657856 ,  chromium:657854 

Review-Url: https://codereview.webrtc.org/2456463002
Cr-Commit-Position: refs/heads/master@{#14860}

[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/api/stats/rtcstatsreport.h
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/stats/rtcstats.cc
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/stats/rtcstats_objects.cc
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/stats/rtcstatsreport.cc
[modify] https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29/webrtc/stats/rtcstatsreport_unittest.cc

Project Member

Comment 69 by bugdroid1@chromium.org, Nov 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/4ed075034a676aad8ec9d65444cb914d4a20b3af

commit 4ed075034a676aad8ec9d65444cb914d4a20b3af
Author: perkj <perkj@webrtc.org>
Date: Tue Nov 01 06:50:53 2016

Revert of RTCInboundRTPStreamStats added. (patchset #4 id:100001 of https://codereview.webrtc.org/2452043002/ )

Reason for revert:
Dependend cl Breaks Chrome FYI.
peerconnection_unittest anropar RTCStatsReport::Create without  parameters.

Original issue's description:
> RTCInboundRTPStreamStats[1] added.
>
> Not all stats are collected in this CL, this must be addressed before
> closing the issue.
>
> [1] https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*
>
> BUG= chromium:627816 ,  chromium:657855 ,  chromium:657854 
>
> Committed: https://crrev.com/0d7bf169402ea9345d163998f4f7df89229ac470
> Cr-Commit-Position: refs/heads/master@{#14861}

TBR=hta@webrtc.org,deadbeef@webrtc.org,hbos@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= chromium:627816 ,  chromium:657855 ,  chromium:657854 

Review-Url: https://codereview.webrtc.org/2470683002
Cr-Commit-Position: refs/heads/master@{#14862}

[modify] https://crrev.com/4ed075034a676aad8ec9d65444cb914d4a20b3af/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/4ed075034a676aad8ec9d65444cb914d4a20b3af/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/4ed075034a676aad8ec9d65444cb914d4a20b3af/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/4ed075034a676aad8ec9d65444cb914d4a20b3af/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/4ed075034a676aad8ec9d65444cb914d4a20b3af/webrtc/stats/rtcstats_objects.cc

Project Member

Comment 70 by bugdroid1@chromium.org, Nov 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec

commit 7eaa83622b19c7afa80139d3261e6bfbe2cae6ec
Author: perkj <perkj@webrtc.org>
Date: Tue Nov 01 06:52:25 2016

Revert of RTCOutboundRTPStreamStats added. (patchset #3 id:80001 of https://codereview.webrtc.org/2456463002/ )

Reason for revert:
Breaks Chrome FYI.
peerconnection_unittest calls RTCStatsReport::Create without  parameters.

Original issue's description:
> RTCOutboundRTPStreamStats[1] added.
>
> This also adds RTCRTPStreamStats[2] which it derives from. Not all stats
> are supported in this CL, this must be addressed before closing the
> issue.
>
> RTCStatsReport also gets a timestamp and ToString.
>
> [1] https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
> [2] https://w3c.github.io/webrtc-stats/#streamstats-dict*
>
> BUG= chromium:627816 ,  chromium:657856 ,  chromium:657854 
>
> Committed: https://crrev.com/69e9cb08285f6cbcab547c7a5e6aa668fa6f2d29
> Cr-Commit-Position: refs/heads/master@{#14860}

TBR=hta@webrtc.org,deadbeef@webrtc.org,hbos@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= chromium:627816 ,  chromium:657856 ,  chromium:657854 

Review-Url: https://codereview.webrtc.org/2465223002
Cr-Commit-Position: refs/heads/master@{#14863}

[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/api/stats/rtcstatsreport.h
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/stats/rtcstats.cc
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/stats/rtcstats_objects.cc
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/stats/rtcstatsreport.cc
[modify] https://crrev.com/7eaa83622b19c7afa80139d3261e6bfbe2cae6ec/webrtc/stats/rtcstatsreport_unittest.cc

Project Member

Comment 71 by bugdroid1@chromium.org, Nov 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/6ded19086432b395a85c9a0206fa8a3bc6d33caf

commit 6ded19086432b395a85c9a0206fa8a3bc6d33caf
Author: hbos <hbos@webrtc.org>
Date: Tue Nov 01 08:50:46 2016

RTCOutboundRTPStreamStats[1] added.

This also adds RTCRTPStreamStats[2] which it derives from. Not all stats
are supported in this CL, this must be addressed before closing the
issue.

RTCStatsReport also gets a timestamp and ToString.

[1] https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
[2] https://w3c.github.io/webrtc-stats/#streamstats-dict*

  This was previously reverted https://codereview.webrtc.org/2465223002/
  because RTCStatsReport::Create added a new parameter not used by
  Chromium unittests. Temporarily added a default value to the argument
  to be removed after rolling and updating Chromium.

BUG= chromium:627816 ,  chromium:657856 ,  chromium:657854 
TBR=deadbeef@webrtc.org

Review-Url: https://codereview.webrtc.org/2470703002
Cr-Commit-Position: refs/heads/master@{#14866}

[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/api/stats/rtcstatsreport.h
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/stats/rtcstats.cc
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/stats/rtcstats_objects.cc
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/stats/rtcstatsreport.cc
[modify] https://crrev.com/6ded19086432b395a85c9a0206fa8a3bc6d33caf/webrtc/stats/rtcstatsreport_unittest.cc

Project Member

Comment 74 by bugdroid1@chromium.org, Nov 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/82ebe02491d066697717ae386f886b752729e013

commit 82ebe02491d066697717ae386f886b752729e013
Author: hbos <hbos@webrtc.org>
Date: Mon Nov 14 09:41:09 2016

Correct stats for RTCPeerConnectionStats.dataChannels[Opened/Closed].

DataChannel.SignalOpened and unittests added.
PeerConnection.SignalDataChannelCreated added and wired up to
RTCStatsCollector.OnDataChannelCreated on RTCStatsCollector
construction.
RTCStatsCollector.OnSignalOpened/Closed added and wired up on
OnDataChannelCreated.
rtcstatscollector_unittest.cc updated, faking that channels are opened
and closed.

I did not want to use DataChannelObserver because it is used for more
than state changes and there can only be one observer (unless code is
updated). Since DataChannel already had a SignalClosed it made sense to
add a SignalOpened.

Having OnSignalBlah in RTCStatsCollector is new in this CL but will
likely be needed to correctly handle RTPMediaStreamTracks being added
and detached independently of getStats. This CL establishes this
pattern.

(An integration test will be needed for this and all the other stats to
make sure everything is wired up correctly and test outside of a
mock/fake environment, but this is not news.)

BUG= chromium:636818 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2472113002
Cr-Commit-Position: refs/heads/master@{#15059}

[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/datachannel.cc
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/datachannel.h
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/datachannel_unittest.cc
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/peerconnection.cc
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/peerconnection.h
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/82ebe02491d066697717ae386f886b752729e013/webrtc/api/rtcstatscollector_unittest.cc

Project Member

Comment 75 by bugdroid1@chromium.org, Nov 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/28747969cd2530114759e9d61ee711b887189d72

commit 28747969cd2530114759e9d61ee711b887189d72
Author: hbos <hbos@webrtc.org>
Date: Mon Nov 21 17:17:41 2016

RTCStats operator== bugfix

a == b would return true if a.member is defined even if b.member is
undefined if their values were equal. We would say that b does not have
a value in that case but its value_ member would still be initialized to
something that is being compared to. Bugfix makes sure not to do value
comparison in this case if b is undefined.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2517163002
Cr-Commit-Position: refs/heads/master@{#15172}

[modify] https://crrev.com/28747969cd2530114759e9d61ee711b887189d72/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/28747969cd2530114759e9d61ee711b887189d72/webrtc/stats/rtcstats_unittest.cc

Project Member

Comment 76 by bugdroid1@chromium.org, Nov 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/820f578f2bb3585cc48876fa9e594a6a6b0dd174

commit 820f578f2bb3585cc48876fa9e594a6a6b0dd174
Author: hbos <hbos@webrtc.org>
Date: Tue Nov 22 11:16:50 2016

RTCInboundRTPStreamStats's [fir/pli/nack]_count are collected for video.

Previously this was only collected for RTCOutboundRTPStreamStats video,
with no comment saying it was missing for Inbound. (nack_count should be
collected vor audio as well but this is currently not available - there
is already an existing comment about this in rtcstats_objects.h.)

BUG= chromium:657855 ,  chromium:657854 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2515293002
Cr-Commit-Position: refs/heads/master@{#15185}

[modify] https://crrev.com/820f578f2bb3585cc48876fa9e594a6a6b0dd174/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/820f578f2bb3585cc48876fa9e594a6a6b0dd174/webrtc/api/rtcstatscollector_unittest.cc

Project Member

Comment 78 by bugdroid1@chromium.org, Nov 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a9a590c838590a32b0a9cf5112ea2fb615a8f58

commit 4a9a590c838590a32b0a9cf5112ea2fb615a8f58
Author: hbos <hbos@chromium.org>
Date: Fri Nov 25 10:19:37 2016

RTCPeerConnection.getStats: Whitelist of stats in unittest.

The promise-based getStats automatically translates WebRTC layer stats
to JavaScript dictionary objects. The whitelist is meant to prevent
leaking stats to the web platform that don't have an associated Chromium
CL explicitly allowing it to be exposed (by updating the whitelist).

The whitelist describes RTCStats-derived dictionary objects according to
the spec[1]. A stats object returned by getStats must have a known
"type" and any member it has must exist in the whitelist with the
correct type.

Note that this only prevents stats from being exposed to the web that
would be returned by getStats in the scenario tested for in this
unittest. In a future CL we will make sure that ALL stats in the
whitelist are returned by the test to ensure sufficient test coverage
and update the unittest if that is not the case.

[1] https://w3c.github.io/webrtc-stats/

BUG= 627816 

Review-Url: https://codereview.chromium.org/2489673003
Cr-Commit-Position: refs/heads/master@{#434471}

[modify] https://crrev.com/4a9a590c838590a32b0a9cf5112ea2fb615a8f58/chrome/browser/media/webrtc/webrtc_browsertest.cc
[modify] https://crrev.com/4a9a590c838590a32b0a9cf5112ea2fb615a8f58/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/4a9a590c838590a32b0a9cf5112ea2fb615a8f58/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/4a9a590c838590a32b0a9cf5112ea2fb615a8f58/chrome/test/data/webrtc/peerconnection_getstats.js

Project Member

Comment 79 by bugdroid1@chromium.org, Nov 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20033c03bd6c08920f93544110a263a13e256c2f

commit 20033c03bd6c08920f93544110a263a13e256c2f
Author: hbos <hbos@chromium.org>
Date: Fri Nov 25 14:47:04 2016

Filter webrtc::RTCStats by whitelist in surfacing them to Blink.

This ensures that we don't accidentally leak RTCStats dictionaries
that are not ready to be exposed to the web, and makes it so that
exposing a new dictionary requires a Chromium CL (not just WebRTC
repo CLs).

Note that the white list is not applied to members of whitelisted
dictionaries and that all such members are exposed.

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2490183002
Cr-Commit-Position: refs/heads/master@{#434501}

[modify] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/content/renderer/media/rtc_peer_connection_handler_unittest.cc
[modify] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/content/renderer/media/webrtc/rtc_stats.cc
[modify] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/content/renderer/media/webrtc/rtc_stats.h
[add] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/content/renderer/media/webrtc/rtc_stats_unittest.cc
[modify] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/content/test/BUILD.gn
[modify] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/third_party/WebKit/Source/platform/exported/WebRTCStats.cpp
[modify] https://crrev.com/20033c03bd6c08920f93544110a263a13e256c2f/third_party/WebKit/public/platform/WebRTCStats.h

Project Member

Comment 80 by bugdroid1@chromium.org, Nov 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/39ce516e1f6da7816c8794b4fab334230a9c84ce

commit 39ce516e1f6da7816c8794b4fab334230a9c84ce
Author: hbos <hbos@chromium.org>
Date: Fri Nov 25 14:51:33 2016

WebRtcBrowserTest: Include all stats in getStats.

The only stats dictionary that was missing was 'data-channel'. For it to
be included data channels had to be created. Added CreateDataChannel to
webrtc_browsertest_base.h/cc and peerconnection.js. Unittest updated to
EXPECT that no expected stats are missing.

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2527273003
Cr-Commit-Position: refs/heads/master@{#434502}

[modify] https://crrev.com/39ce516e1f6da7816c8794b4fab334230a9c84ce/chrome/browser/media/webrtc/webrtc_browsertest.cc
[modify] https://crrev.com/39ce516e1f6da7816c8794b4fab334230a9c84ce/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/39ce516e1f6da7816c8794b4fab334230a9c84ce/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/39ce516e1f6da7816c8794b4fab334230a9c84ce/chrome/test/data/webrtc/peerconnection.js

Project Member

Comment 81 by bugdroid1@chromium.org, Nov 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fcad418e5a3feb8cdb031ab58081f80ce0de63b4

commit fcad418e5a3feb8cdb031ab58081f80ce0de63b4
Author: sammc <sammc@chromium.org>
Date: Sun Nov 27 23:53:17 2016

Revert of WebRtcBrowserTest: Include all stats in getStats. (patchset #1 id:1 of https://codereview.chromium.org/2527273003/ )

Reason for revert:
Failing on desktop platforms: https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.linux%2FLinux_Tests%2F49343%2F%2B%2Frecipes%2Fsteps%2Fbrowser_tests_on_Ubuntu-12.04%2F0%2Flogs%2FWebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise%2F0

Original issue's description:
> WebRtcBrowserTest: Include all stats in getStats.
>
> The only stats dictionary that was missing was 'data-channel'. For it to
> be included data channels had to be created. Added CreateDataChannel to
> webrtc_browsertest_base.h/cc and peerconnection.js. Unittest updated to
> EXPECT that no expected stats are missing.
>
> BUG= chromium:627816 
>
> Committed: https://crrev.com/39ce516e1f6da7816c8794b4fab334230a9c84ce
> Cr-Commit-Position: refs/heads/master@{#434502}

TBR=phoglund@chromium.org,hbos@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2528253002
Cr-Commit-Position: refs/heads/master@{#434587}

[modify] https://crrev.com/fcad418e5a3feb8cdb031ab58081f80ce0de63b4/chrome/browser/media/webrtc/webrtc_browsertest.cc
[modify] https://crrev.com/fcad418e5a3feb8cdb031ab58081f80ce0de63b4/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/fcad418e5a3feb8cdb031ab58081f80ce0de63b4/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/fcad418e5a3feb8cdb031ab58081f80ce0de63b4/chrome/test/data/webrtc/peerconnection.js

Project Member

Comment 82 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/db346a7cbe511641e11307dc4cbbc8fc0c323845

commit db346a7cbe511641e11307dc4cbbc8fc0c323845
Author: hbos <hbos@webrtc.org>
Date: Tue Nov 29 09:57:01 2016

RTCStatsIntegrationTest added.

This is an integration test using peerconnectiontestwrapper.h to set up
and end to end test using a real PeerConnection implementation. These
tests will complement rtcstatscollector_unittest.cc which collects all
stats using mocks.

The integration test is set up so that all stats types are returned by
GetStats and verifies that expected dictionary members are defined. The
test could in the future be updated to include sanity checks for the
values of members. There is a sanity check that references to other
stats dictionaries yield existing stats of the appropriate type, but
other than that members are only tested for if they are defined not.

StatsCallback of rtcstatscollector_unittest.cc is moved so that it can
be reused and renamed to RTCStatsObtainer.

TODO: Audio stream track stats members are missing in the test. Find out
if this is because of a real problem or because of testing without real
devices. Do this before closing  crbug.com/627816 .

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2521663002
Cr-Commit-Position: refs/heads/master@{#15287}

[modify] https://crrev.com/db346a7cbe511641e11307dc4cbbc8fc0c323845/webrtc/api/BUILD.gn
[add] https://crrev.com/db346a7cbe511641e11307dc4cbbc8fc0c323845/webrtc/api/rtcstats_integrationtest.cc
[modify] https://crrev.com/db346a7cbe511641e11307dc4cbbc8fc0c323845/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/db346a7cbe511641e11307dc4cbbc8fc0c323845/webrtc/api/test/peerconnectiontestwrapper.h
[add] https://crrev.com/db346a7cbe511641e11307dc4cbbc8fc0c323845/webrtc/api/test/rtcstatsobtainer.h

Cc: -foolip@chromium.org
Project Member

Comment 84 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4b50c8ed64214b9394677426b9ebd1f8a50e2a2

commit b4b50c8ed64214b9394677426b9ebd1f8a50e2a2
Author: hbos <hbos@chromium.org>
Date: Tue Nov 29 11:57:08 2016

Reland of "WebRtcBrowserTest: Include all stats in getStats."

The only stats dictionary that was missing was 'data-channel'. For it to
be included data channels had to be created. Added CreateDataChannel to
webrtc_browsertest_base.h/cc and peerconnection.js. Unittest updated to
EXPECT that no expected stats are missing.

Original CL: https://codereview.chromium.org/2527273003/
Reason for revert: A whitelist filter was landed roughly at the same
time as the the original CL, causing expected stats to be blacklisted.
In this re-land, the whitelist is updated.

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2533223003
Cr-Commit-Position: refs/heads/master@{#434963}

[modify] https://crrev.com/b4b50c8ed64214b9394677426b9ebd1f8a50e2a2/chrome/browser/media/webrtc/webrtc_browsertest.cc
[modify] https://crrev.com/b4b50c8ed64214b9394677426b9ebd1f8a50e2a2/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/b4b50c8ed64214b9394677426b9ebd1f8a50e2a2/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/b4b50c8ed64214b9394677426b9ebd1f8a50e2a2/chrome/test/data/webrtc/peerconnection.js
[modify] https://crrev.com/b4b50c8ed64214b9394677426b9ebd1f8a50e2a2/content/renderer/media/webrtc/rtc_stats.cc

Project Member

Comment 85 by bugdroid1@chromium.org, Nov 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/0583b286e44b6f6d4d5c5185ed94b60f37aad598

commit 0583b286e44b6f6d4d5c5185ed94b60f37aad598
Author: hbos <hbos@webrtc.org>
Date: Wed Nov 30 09:50:14 2016

Collecting RTCIceCandidatePairStats.transport_id and improved unittests.

RTCIceCandidatePairStats.transport_id is set to the related
RTCTransportStats' id.

Unittest for RTCIceCandidatePairStats is updated to do EXPECT_EQ
between actual and an expected hardcoded dictionary. The previous way of
testing, ExpectReportContainsCandidatePair, is removed.

(ExpectReportContainsCandidate still exist, we might want to replace
this by EXPECT_EQ testing in a follow up.)

Unittest for RTCTransportStats is similarly updated and
ExpectReportContainsTransportStats is removed. A bug was uncovered where
the "rtcp_connection_info.best_connection = true" case was not tested
(a copy of rtcp_connection_info was used in the test, modifying that had
no affect on the test) - fixed.

rtcstats_integrationtest.cc updated to take transport_id into account.

In order to reuse an updated version of expected_rt[c]p_transport in the
unittest, timestamps are ignored by RTCStats::operator==.

BUG= chromium:627816 ,  chromium:653873 ,  chromium:653873 ,  webrtc:6755 

Review-Url: https://codereview.webrtc.org/2527113002
Cr-Commit-Position: refs/heads/master@{#15316}

[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/api/rtcstats_integrationtest.cc
[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/api/stats/rtcstats.h
[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/stats/rtcstats.cc
[modify] https://crrev.com/0583b286e44b6f6d4d5c5185ed94b60f37aad598/webrtc/stats/rtcstats_unittest.cc

Comment 86 by hbos@chromium.org, Nov 30 2016

Blockedon: 669877

Comment 87 by hbos@chromium.org, Dec 1 2016

Blockedon: 670306
Project Member

Comment 88 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c6ab14b0aa877c3e8e885934608d95849ff9a1a8

commit c6ab14b0aa877c3e8e885934608d95849ff9a1a8
Author: hbos <hbos@chromium.org>
Date: Fri Dec 02 09:25:32 2016

Preparation CL for WebRTC performance test using promise-based getStats

In order to have a perf test looking at stats of interest we need to be
able to get the results of a JavaScript getStats call. These can be
returned as JSON-stringified JavaScript dictionaries.

In this CL:
- [g|G]etStatsReportDictionary added to webrtc_browsertest_base.cc and
  peerconnection_getstats.js, which produce/read a JSON-stringified
  version of the stats.
- RTCStatsReportDictionary and RTCStatsDictionary, helper classes for
  reading stats from the base::Dictionary representation of the stats.
- Unittests for the helper classes.

In a follow-up CL these methods/classes will be used to obtain the
stats in the to-be-added performance test. This will yield pretty
graphs.

BUG= 670306 ,  627816 

Review-Url: https://codereview.chromium.org/2534633002
Cr-Commit-Position: refs/heads/master@{#435894}

[add] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/browser/media/webrtc/test_stats_dictionary.cc
[add] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/browser/media/webrtc/test_stats_dictionary.h
[add] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/browser/media/webrtc/test_stats_dictionary_unittest.cc
[modify] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/test/BUILD.gn
[modify] https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8/chrome/test/data/webrtc/peerconnection_getstats.js

Project Member

Comment 89 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f50152dfc457a09afb6dca4a6ea9942af9a3b07a

commit f50152dfc457a09afb6dca4a6ea9942af9a3b07a
Author: hbos <hbos@chromium.org>
Date: Fri Dec 02 09:39:09 2016

Revert of Preparation CL for WebRTC performance test using promise-based getStats (patchset #4 id:160001 of https://codereview.chromium.org/2534633002/ )

Reason for revert:
Compile error on http://build.chromium.org/p/chromium.webrtc/builders/Linux%20Builder/builds/88436 due to uninitialized variables (warning treated as an error).

False alarm warning but I'll have to init and reland

Original issue's description:
> Preparation CL for WebRTC performance test using promise-based getStats
>
> In order to have a perf test looking at stats of interest we need to be
> able to get the results of a JavaScript getStats call. These can be
> returned as JSON-stringified JavaScript dictionaries.
>
> In this CL:
> - [g|G]etStatsReportDictionary added to webrtc_browsertest_base.cc and
>   peerconnection_getstats.js, which produce/read a JSON-stringified
>   version of the stats.
> - RTCStatsReportDictionary and RTCStatsDictionary, helper classes for
>   reading stats from the base::Dictionary representation of the stats.
> - Unittests for the helper classes.
>
> In a follow-up CL these methods/classes will be used to obtain the
> stats in the to-be-added performance test. This will yield pretty
> graphs.
>
> BUG= 670306 ,  627816 
>
> Committed: https://crrev.com/c6ab14b0aa877c3e8e885934608d95849ff9a1a8
> Cr-Commit-Position: refs/heads/master@{#435894}

TBR=phoglund@chromium.org,hta@chromium.org,tommi@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 670306 ,  627816 

Review-Url: https://codereview.chromium.org/2544033003
Cr-Commit-Position: refs/heads/master@{#435897}

[delete] https://crrev.com/a12310b23b600d971816c01bb5cd7f6034db50fa/chrome/browser/media/webrtc/test_stats_dictionary.cc
[delete] https://crrev.com/a12310b23b600d971816c01bb5cd7f6034db50fa/chrome/browser/media/webrtc/test_stats_dictionary.h
[delete] https://crrev.com/a12310b23b600d971816c01bb5cd7f6034db50fa/chrome/browser/media/webrtc/test_stats_dictionary_unittest.cc
[modify] https://crrev.com/f50152dfc457a09afb6dca4a6ea9942af9a3b07a/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/f50152dfc457a09afb6dca4a6ea9942af9a3b07a/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/f50152dfc457a09afb6dca4a6ea9942af9a3b07a/chrome/test/BUILD.gn
[modify] https://crrev.com/f50152dfc457a09afb6dca4a6ea9942af9a3b07a/chrome/test/data/webrtc/peerconnection_getstats.js

Project Member

Comment 90 by bugdroid1@chromium.org, Dec 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f0df039e3c3e854d5a527744e7855b09b4add67

commit 4f0df039e3c3e854d5a527744e7855b09b4add67
Author: hbos <hbos@chromium.org>
Date: Mon Dec 05 10:11:32 2016

Preparation CL for WebRTC performance test using promise-based getStats
Re-land of https://codereview.chromium.org/2534633002/

In order to have a perf test looking at stats of interest we need to be
able to get the results of a JavaScript getStats call. These can be
returned as JSON-stringified JavaScript dictionaries.

In this CL:
- [g|G]etStatsReportDictionary added to webrtc_browsertest_base.cc and
  peerconnection_getstats.js, which produce/read a JSON-stringified
  version of the stats.
- RTCStatsReportDictionary and RTCStatsDictionary, helper classes for
  reading stats from the base::Dictionary representation of the stats.
- Unittests for the helper classes.

In a follow-up CL these methods/classes will be used to obtain the
stats in the to-be-added performance test. This will yield pretty
graphs.

BUG= 670306 ,  627816 

Review-Url: https://codereview.chromium.org/2543173002
Cr-Commit-Position: refs/heads/master@{#436252}

[add] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/browser/media/webrtc/test_stats_dictionary.cc
[add] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/browser/media/webrtc/test_stats_dictionary.h
[add] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/browser/media/webrtc/test_stats_dictionary_unittest.cc
[modify] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/test/BUILD.gn
[modify] https://crrev.com/4f0df039e3c3e854d5a527744e7855b09b4add67/chrome/test/data/webrtc/peerconnection_getstats.js

Project Member

Comment 91 by bugdroid1@chromium.org, Dec 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/32bafc424946864c744ecfc0cbd83f6d5c18852b

commit 32bafc424946864c744ecfc0cbd83f6d5c18852b
Author: hbos <hbos@chromium.org>
Date: Mon Dec 05 11:19:58 2016

WebRtcStatsPerfBrowserTest added, a perf test using the new getStats.

Using the promise-based getStats to collect stats, writes stats after
60+10* seconds of audio and video calling. These will be picked up by
the Chrome Performance Dashboard[1]. E.g. from other browser test: [2].
*(After 60s of ramp-up, performs measurments during a 10s window, to
avoid unstable stats due to variations in ramp-up time.)

This is similar to the WebRtcPerfBrowserTest - renamed
WebRtcInternalsBrowserTest to avoid confusion - which instead uses
chrome://webrtc-internals relying on the old callback-based version of
getStats. Available stats are different.

This performance test only picks up:
- browser_tests / audio_[codec] / send_rate
- browser_tests / audio_[codec] / receive_rate
- browser_tests / video_[codec] / send_rate
- browser_tests / video_[codec] / receive_rate
Based on "RTC[In/Out]boundRTPStreamStats.bytes_[sent/received]" values
[3][4].
For audio codecs: opus, ISAC, G722, PCMU, PCMA.
And video codecs: VP8, VP9, H264.

More stats can be picked up in follow-up CLs, but the new getStats API
has a limited number of stats available.

[1] https://chromeperf.appspot.com/
[2] https://chromeperf.appspot.com/report?sid=4a337ff35047d3a12a0b6d05fa1bf95e001c824cd1821be95dc7799134ae9b67
[3] https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-bytessent
[4] https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-bytesreceived

BUG= 670306 ,  627816 

Review-Url: https://codereview.chromium.org/2545553003
Cr-Commit-Position: refs/heads/master@{#436260}

[modify] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[add] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/browser/media/webrtc/webrtc_internals_perf_browsertest.cc
[modify] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/browser/media/webrtc/webrtc_perf_browsertest.cc
[add] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/browser/media/webrtc/webrtc_stats_perf_browsertest.cc
[modify] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/test/BUILD.gn
[modify] https://crrev.com/32bafc424946864c744ecfc0cbd83f6d5c18852b/chrome/test/data/webrtc/peerconnection.js

Project Member

Comment 92 by bugdroid1@chromium.org, Dec 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8cceaa55958857f7d5d4c9d4c2fbdbb28de69c52

commit 8cceaa55958857f7d5d4c9d4c2fbdbb28de69c52
Author: hbos <hbos@chromium.org>
Date: Mon Dec 05 19:14:57 2016

Make runtime feature RTCPeerConnectionNewGetStats experimental.

Was previously a test feature, but this is pretty mature by now. We want
it to be included for those who use experimental web platform features
in chrome://flags.

Affects: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl?q=RTCPeerConnection.idl&sq=package:chromium&dr&l=110

BUG= 627816 

Review-Url: https://codereview.chromium.org/2546103002
Cr-Commit-Position: refs/heads/master@{#436372}

[modify] https://crrev.com/8cceaa55958857f7d5d4c9d4c2fbdbb28de69c52/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Comment 93 by hbos@webrtc.org, Dec 12 2016

Blockedon: webrtc:6871

Comment 94 by hbos@webrtc.org, Dec 12 2016

Blockedon: webrtc:6872

Comment 95 by hbos@webrtc.org, Dec 12 2016

Blockedon: webrtc:6875
Project Member

Comment 96 by bugdroid1@chromium.org, Dec 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/8f2309478da41cd8b829d022874dfd5ddc58551c

commit 8f2309478da41cd8b829d022874dfd5ddc58551c
Author: hbos <hbos@webrtc.org>
Date: Tue Dec 13 09:45:09 2016

New PeerConnectionInterface::GetStats: No bogus default implementation.

The Chromium mock implementation implements the new GetStats API, so we
can remove this default implementation.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2566143002
Cr-Commit-Position: refs/heads/master@{#15563}

[modify] https://crrev.com/8f2309478da41cd8b829d022874dfd5ddc58551c/webrtc/api/peerconnectioninterface.h

Project Member

Comment 97 by bugdroid1@chromium.org, Dec 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/e381015ca0c1104edfd0688bcedff29b2e4eae07

commit e381015ca0c1104edfd0688bcedff29b2e4eae07
Author: hbos <hbos@webrtc.org>
Date: Tue Dec 13 10:35:19 2016

Revert of New PeerConnectionInterface::GetStats: No bogus default implementation. (patchset #1 id:1 of https://codereview.webrtc.org/2566143002/ )

Reason for revert:
Breaks google3 importer:
http://webrtc-buildbot-master.mtv.corp.google.com:21000/builders/WebRTC%20google3%20Importer/builds/11260

Original issue's description:
> New PeerConnectionInterface::GetStats: No bogus default implementation.
>
> The Chromium mock implementation implements the new GetStats API, so we
> can remove this default implementation.
>
> BUG= chromium:627816 
>
> Committed: https://crrev.com/8f2309478da41cd8b829d022874dfd5ddc58551c
> Cr-Commit-Position: refs/heads/master@{#15563}

TBR=deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2575493002
Cr-Commit-Position: refs/heads/master@{#15567}

[modify] https://crrev.com/e381015ca0c1104edfd0688bcedff29b2e4eae07/webrtc/api/peerconnectioninterface.h

Project Member

Comment 98 by bugdroid1@chromium.org, Dec 15 2016

Project Member

Comment 99 by bugdroid1@chromium.org, Dec 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/7bf536976366443ea59153ff3d22da0ec32badc1

commit 7bf536976366443ea59153ff3d22da0ec32badc1
Author: hbos <hbos@webrtc.org>
Date: Thu Dec 15 11:33:35 2016

RTCStatsIntegrationTest: TestMemberIsIDReference on all defined IDs.

This makes sure that the referenced stats dictionaries exist.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2577033002
Cr-Commit-Position: refs/heads/master@{#15628}

[modify] https://crrev.com/7bf536976366443ea59153ff3d22da0ec32badc1/webrtc/api/rtcstats_integrationtest.cc

Project Member

Comment 100 by bugdroid1@chromium.org, Dec 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b9eb7452508f0adec7ae4bedc1bc9350e2e224d

commit 3b9eb7452508f0adec7ae4bedc1bc9350e2e224d
Author: hbos <hbos@chromium.org>
Date: Thu Dec 15 11:53:34 2016

Whitelist new member names of RTCIceCandidatePairStats.

totalRtt and currentRtt have been renamed in the spec to
totalRoundTripTime and currentRoundTripTime:
https://w3c.github.io/webrtc-stats/#since-21-sep-2016*

Both old and new names are whitelisted until
https://codereview.webrtc.org/2576383002/ has rolled into Chromium.
When the roll is done old names will be removed.

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2577923004
Cr-Commit-Position: refs/heads/master@{#438808}

[modify] https://crrev.com/3b9eb7452508f0adec7ae4bedc1bc9350e2e224d/chrome/test/data/webrtc/peerconnection_getstats.js

Project Member

Comment 102 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/df6075a77ffae5e0de7c272abc56183faf04814e

commit df6075a77ffae5e0de7c272abc56183faf04814e
Author: hbos <hbos@webrtc.org>
Date: Mon Dec 19 12:58:02 2016

RTCStatsCollector: Utilize network thread to minimize thread hops.

(This is a re-upload of https://codereview.webrtc.org/2567243003/, the
CQ stopped working there.)

The previously used WebRtcSession::GetTransportStats did a synchronous
invoke per channel (voice, video, data) on the signaling thread to the
network thread - e.g. 3 blocking invokes.

It is replaced by WebRtcSession::GetStats[_s] which can be invoked on
the signaling thread or on any thread if a ChannelNamePairs argument is
present (provided by WebRtcSession::GetChannelNamePairs on the signaling
thread).

With these changes, and changes allowing the getting of certificates
from any thread, the RTCStatsCollector can turn the 3 blocking thread
invokes into 1 non-blocking invoke.

BUG= webrtc:6875 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2583883002
Cr-Commit-Position: refs/heads/master@{#15672}

[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/statscollector.cc
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/statscollector_unittest.cc
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/test/mock_webrtcsession.h
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/webrtcsession.cc
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/webrtcsession.h
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/api/webrtcsession_unittest.cc
[modify] https://crrev.com/df6075a77ffae5e0de7c272abc56183faf04814e/webrtc/p2p/base/transportcontroller.cc

Project Member

Comment 103 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/b78306a7d339bfcc3c4a6043023ab57d95444b99

commit b78306a7d339bfcc3c4a6043023ab57d95444b99
Author: hbos <hbos@webrtc.org>
Date: Mon Dec 19 13:06:57 2016

Fix segfault when PeerConnection is destroyed during stats collection.

RTCStatsCollector relies on PeerConnection and its WebRtcSession. If the
PeerConnection is destroyed, reference counting keeps the
RTCStatsCollector alive until the request has completed. But the request
is using PeerConnection/WebRtcSession resources that are destroyed in
~PeerConnection().

To get around this problem, RTCStatsCollector::WaitForPendingRequest()
is added, which is invoked at ~PeerConnection().

Integration test added, it caused a segmentation fault before this
change / EXPECT failure.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2583613003
Cr-Commit-Position: refs/heads/master@{#15674}

[modify] https://crrev.com/b78306a7d339bfcc3c4a6043023ab57d95444b99/webrtc/api/peerconnection.cc
[modify] https://crrev.com/b78306a7d339bfcc3c4a6043023ab57d95444b99/webrtc/api/rtcstats_integrationtest.cc
[modify] https://crrev.com/b78306a7d339bfcc3c4a6043023ab57d95444b99/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/b78306a7d339bfcc3c4a6043023ab57d95444b99/webrtc/api/rtcstatscollector.h

Project Member

Comment 104 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/7472dc3b9444cb05b17023b87dd3e8016773f359

commit 7472dc3b9444cb05b17023b87dd3e8016773f359
Author: hbos <hbos@webrtc.org>
Date: Mon Dec 19 17:34:14 2016

Removed undefined method from webrtcsession.h.

It was accidentally added in https://codereview.webrtc.org/2583883002/
(added in one patch set, removed in another but forgot about the header
declaration).

BUG= webrtc:6875 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2583123003
Cr-Commit-Position: refs/heads/master@{#15685}

[modify] https://crrev.com/7472dc3b9444cb05b17023b87dd3e8016773f359/webrtc/api/webrtcsession.h

Project Member

Comment 105 by bugdroid1@chromium.org, Dec 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/7472dc3b9444cb05b17023b87dd3e8016773f359

commit 7472dc3b9444cb05b17023b87dd3e8016773f359
Author: hbos <hbos@webrtc.org>
Date: Mon Dec 19 17:34:14 2016

Removed undefined method from webrtcsession.h.

It was accidentally added in https://codereview.webrtc.org/2583883002/
(added in one patch set, removed in another but forgot about the header
declaration).

BUG= webrtc:6875 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2583123003
Cr-Commit-Position: refs/heads/master@{#15685}

[modify] https://crrev.com/7472dc3b9444cb05b17023b87dd3e8016773f359/webrtc/api/webrtcsession.h

Comment 106 by hbos@webrtc.org, Dec 20 2016

Blockedon: webrtc:6920
Project Member

Comment 107 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/02d2a92d92d05c3014d779efd5c03e0822b7dbe7

commit 02d2a92d92d05c3014d779efd5c03e0822b7dbe7
Author: hbos <hbos@webrtc.org>
Date: Wed Dec 21 09:29:05 2016

RTCStatsReport::AddStats DCHECKs that the ID is unique.

Previously it was allowed to call AddStats with stats of the same ID
multiple times.

This revealed a few things:
- Local and remote streams can have the same label.
  RTCMediaStreamStats's ID is updated to include "local"/"remote".
- The same certificate can show up multiple times (e.g. for local and
  remote in a loopback), so we skip creating RTCCertificateStats for the
  same certificate multiple times

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2593503003
Cr-Commit-Position: refs/heads/master@{#15730}

[modify] https://crrev.com/02d2a92d92d05c3014d779efd5c03e0822b7dbe7/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/02d2a92d92d05c3014d779efd5c03e0822b7dbe7/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/02d2a92d92d05c3014d779efd5c03e0822b7dbe7/webrtc/api/stats/rtcstatsreport.h
[modify] https://crrev.com/02d2a92d92d05c3014d779efd5c03e0822b7dbe7/webrtc/stats/rtcstatsreport.cc

Project Member

Comment 108 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/dbb64d8f27e8aaee4e37b6e16503bb5f7406aeed

commit dbb64d8f27e8aaee4e37b6e16503bb5f7406aeed
Author: hbos <hbos@webrtc.org>
Date: Wed Dec 21 09:57:46 2016

RTCStatsCollectorTest: Remove ExpectReportContainsDataChannel.

Remove ExpectReportContainsDataChannel in favor of EXPECT_EQ checks of
RTCDataChannelStats objects.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2597433002
Cr-Commit-Position: refs/heads/master@{#15731}

[modify] https://crrev.com/dbb64d8f27e8aaee4e37b6e16503bb5f7406aeed/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/dbb64d8f27e8aaee4e37b6e16503bb5f7406aeed/webrtc/api/test/mock_datachannel.h

Project Member

Comment 109 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/c42ba32877d3b520f96dff5720f83f5230580fe2

commit c42ba32877d3b520f96dff5720f83f5230580fe2
Author: hbos <hbos@webrtc.org>
Date: Wed Dec 21 11:31:45 2016

RTCStatsCollectorTest: Remove ExpectReportContainsCandidate.

Remove ExpectReportContainsCandidate in favor of EXPECT_EQ checks of
RTC[Local/Remote]IceCandidateStats objects.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2594753002
Cr-Commit-Position: refs/heads/master@{#15737}

[modify] https://crrev.com/c42ba32877d3b520f96dff5720f83f5230580fe2/webrtc/api/rtcstatscollector_unittest.cc

Project Member

Comment 110 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/381153f75c73bd665fefd04e5dd9de379a40b082

commit 381153f75c73bd665fefd04e5dd9de379a40b082
Author: hbos <hbos@chromium.org>
Date: Wed Dec 21 12:25:07 2016

RTCPeerConnection.getStats: Remove selector argument.

In preparation for shipping[1] the promise-based getStats, the selector
argument is removed. It was ignored by our implementation. If we want it
we can add it as a separate feature launch, but there is an ongoing
discussion about the usefulness of |selector|.[2]

[1] Intent to Ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/bG-3TFOZC3s
[2] webrtc-stats issue: https://github.com/w3c/webrtc-stats/issues/116

BUG= chromium:627816 

Review-Url: https://codereview.chromium.org/2591763002
Cr-Commit-Position: refs/heads/master@{#440073}

[modify] https://crrev.com/381153f75c73bd665fefd04e5dd9de379a40b082/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-getStats-promise.html
[modify] https://crrev.com/381153f75c73bd665fefd04e5dd9de379a40b082/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
[modify] https://crrev.com/381153f75c73bd665fefd04e5dd9de379a40b082/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
[modify] https://crrev.com/381153f75c73bd665fefd04e5dd9de379a40b082/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl

Project Member

Comment 111 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/23368e1aef2e8828ca0ac07405c1debd14b0c77d

commit 23368e1aef2e8828ca0ac07405c1debd14b0c77d
Author: hbos <hbos@webrtc.org>
Date: Wed Dec 21 12:29:17 2016

RTCStatsCollectorTest: ExpectReportContainsCertificateInfo /w EXPECT_EQ

Modify ExpectReportContainsCertificateInfo to use EXPECT_EQ checks of
RTCCertificateStats objects.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2594553003
Cr-Commit-Position: refs/heads/master@{#15738}

[modify] https://crrev.com/23368e1aef2e8828ca0ac07405c1debd14b0c77d/webrtc/api/rtcstatscollector_unittest.cc

Project Member

Comment 112 by bugdroid1@chromium.org, Jan 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/f415f8ae73a33bbb965c70d37cbea29cf06903e4

commit f415f8ae73a33bbb965c70d37cbea29cf06903e4
Author: hbos <hbos@webrtc.org>
Date: Mon Jan 02 12:28:51 2017

Removed RTCStatsCollector::ProducePartialResultsOnWorkerThread.

No stats are collected by it, remove to reduce unnecessary thread hops.

BUG= webrtc:6875 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2583193002
Cr-Commit-Position: refs/heads/master@{#15862}

[modify] https://crrev.com/f415f8ae73a33bbb965c70d37cbea29cf06903e4/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/f415f8ae73a33bbb965c70d37cbea29cf06903e4/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/f415f8ae73a33bbb965c70d37cbea29cf06903e4/webrtc/api/rtcstatscollector_unittest.cc

Project Member

Comment 114 by bugdroid1@chromium.org, Jan 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/23351197fb981c7a457991fdb16b1a2f35e4bb65

commit 23351197fb981c7a457991fdb16b1a2f35e4bb65
Author: hbos <hbos@webrtc.org>
Date: Mon Jan 02 14:52:19 2017

Improve rtcstats_integrationtest.cc by sanity checking values.

TestMemberIsPositive and TestMemberIsNonNegative added and used in test.

BUG= chromium:627816 

Review-Url: https://codereview.webrtc.org/2593623002
Cr-Commit-Position: refs/heads/master@{#15866}

[modify] https://crrev.com/23351197fb981c7a457991fdb16b1a2f35e4bb65/webrtc/api/rtcstats_integrationtest.cc

Project Member

Comment 115 by bugdroid1@chromium.org, Jan 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe

commit 06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe
Author: hbos <hbos@webrtc.org>
Date: Mon Jan 02 16:08:18 2017

RTCIceCandidatePairStats.[state/priority] added, ConnectionInfo updated.

State and priority added to ConnectionInfo. The Connection::State enum
is replaced by IceCandidatePairState enum class.

At P2PTransportChannel::GetStats, Connection::stats is called, producing
ConnectionInfo for the connection that is then filled in with additional
values from the Connection. This is refactored so that all values are
set by Connection::stats.

RTCStatsCollector is updated to surface the ConnectionInfo stats.

BUG= webrtc:6755 ,  chromium:633550 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2597423003
Cr-Commit-Position: refs/heads/master@{#15870}

[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/api/rtcstats_integrationtest.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/jseptransport.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/jseptransport.h
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/p2ptransportchannel.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/p2ptransportchannel_unittest.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/port.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/port.h
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/p2p/base/turnport_unittest.cc
[modify] https://crrev.com/06495bcbb7477b8df1e9f2e34eae0efd11e0b9fe/webrtc/stats/rtcstats_objects.cc

Project Member

Comment 117 by bugdroid1@chromium.org, Jan 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3a849d6f9efef1f90688ef3d11f8ca75618ac3a

commit a3a849d6f9efef1f90688ef3d11f8ca75618ac3a
Author: hbos <hbos@chromium.org>
Date: Mon Jan 02 16:43:12 2017

RTCPeerConnection.getStats: Whitelist updated after spec changed.

This is the whitelist used in the Chromium integration test.

New members:
- RTCRTPStreamStats.qpSum: https://w3c.github.io/webrtc-stats/#dom-rtcrtpstreamstats-qpsum
- RTCInboundRTPStreamStats.framesDecoded: https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-framesdecoded
- RTCOutboundRTPStreamStats.framesEncoded: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-framesencoded
- RTCIceCandidateStats.transportId: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-transportid
- RTCIceCandidateStats.isRemote: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-isremote
- RTCIceCandidateStats.deleted: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-deleted

Renamed members, removed old names (https://codereview.webrtc.org/2576383002/):
- RTCIceCandidatePairStats.totalRtt replaced by totalRoundTripTime: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-totalroundtriptime
- RTCIceCandidatePairStats.currentRtt replaced by currentRoundTripTime: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-currentroundtriptime

NOTRY=True
BUG= chromium:627816 ,  chromium:657854 ,  chromium:657855 ,  chromium:657856 ,  chromium:632723 

Review-Url: https://codereview.chromium.org/2590293004
Cr-Commit-Position: refs/heads/master@{#441073}

[modify] https://crrev.com/a3a849d6f9efef1f90688ef3d11f8ca75618ac3a/chrome/test/data/webrtc/peerconnection_getstats.js

Comment 119 by hbos@chromium.org, Jan 10 2017

Blockedon: 679741

Comment 121 by hbos@chromium.org, Jan 11 2017

Blockedon: 680172
Project Member

Comment 122 by bugdroid1@chromium.org, Jan 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60

commit 1f8239ca6f887ecb8c2c8347c00b5ac681e83c60
Author: hbos <hbos@webrtc.org>
Date: Mon Jan 16 12:24:10 2017

TrackMediaInfoMap added.

This maps, in both directions, [Audio/Video]TrackInterface with
[Voice/Video][Sender/Receiver]Info.

This mapping is necessary for RTCStatsCollector to know the relationship
between RTCMediaStreamTrackStats and RTC[In/Out]boundRTPStreamStats, and
to be able to collect several RTCMediaStreamTrackStats stats.

BUG= webrtc:6757 ,  chromium:659137 ,  chromium:657854 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2611983002
Cr-Commit-Position: refs/heads/master@{#16090}

[modify] https://crrev.com/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60/webrtc/api/BUILD.gn
[add] https://crrev.com/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60/webrtc/api/test/mock_rtpreceiver.h
[add] https://crrev.com/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60/webrtc/api/test/mock_rtpsender.h
[add] https://crrev.com/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60/webrtc/api/trackmediainfomap.cc
[add] https://crrev.com/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60/webrtc/api/trackmediainfomap.h
[add] https://crrev.com/1f8239ca6f887ecb8c2c8347c00b5ac681e83c60/webrtc/api/trackmediainfomap_unittest.cc

Project Member

Comment 123 by bugdroid1@chromium.org, Jan 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d28adf3696a330580b5fb705531322ca4f9f3297

commit d28adf3696a330580b5fb705531322ca4f9f3297
Author: hbos <hbos@chromium.org>
Date: Mon Jan 16 12:56:26 2017

RTCPeerConnection.getStats whitelist updated due to recent spec changes.

RTCRTPStreamStats.mediaTrackId renamed trackId: https://github.com/w3c/webrtc-stats/issues/113#issuecomment-271548836
RTCMediaStreamTrackStats.kind added: https://github.com/w3c/webrtc-stats/pull/127
RTCPeerConnectionStats.dataChannels[Opened/Closed/Requested/Accepted] added: https://github.com/w3c/webrtc-stats/pull/125/files
RTCTransportStats.activeConnection replaced by dtlsState: https://github.com/w3c/webrtc-stats/pull/122/files

BUG= chromium:657854 ,  chromium:659137 ,  chromium:679741 ,  chromium:653873 ,  chromium:627816 

Review-Url: https://codereview.chromium.org/2621733004
Cr-Commit-Position: refs/heads/master@{#443879}

[modify] https://crrev.com/d28adf3696a330580b5fb705531322ca4f9f3297/chrome/test/data/webrtc/peerconnection_getstats.js

Project Member

Comment 124 by bugdroid1@chromium.org, Jan 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/84abeb1d37ee27147674cd94a5606bd4ac725d9a

commit 84abeb1d37ee27147674cd94a5606bd4ac725d9a
Author: hbos <hbos@webrtc.org>
Date: Mon Jan 16 14:16:44 2017

RTC[In/Out]boundRTPStreamStats.mediaTrackId collected.

Based on the mapping between [Audio/Video]TrackInterface and
[Voice/Video][Sender/Receiver]Info.

The IDs of RTCMediaStreamTrackStats are updated to distinguish between
local and remote cases. Previously, if local and remote cases had the
same label only one of them would be included in the report (bug).

BUG= webrtc:6758 ,  chromium:657854 ,  chromium:657855 ,  chromium:657856 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2610843003
Cr-Commit-Position: refs/heads/master@{#16095}

[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/rtcstats_integrationtest.cc
[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/rtcstatscollector.h
[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/rtcstatscollector_unittest.cc
[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/statscollector_unittest.cc
[modify] https://crrev.com/84abeb1d37ee27147674cd94a5606bd4ac725d9a/webrtc/api/test/mock_peerconnection.h

Comment 127 by hbos@chromium.org, Jan 19 2017

Labels: -M-57 M-58

Comment 128 by hbos@chromium.org, Jan 19 2017

Blockedon: 682691
Project Member

Comment 129 by bugdroid1@chromium.org, Jan 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/9e30274c03c8e812abeb37c7876648e3cae0805a

commit 9e30274c03c8e812abeb37c7876648e3cae0805a
Author: hbos <hbos@webrtc.org>
Date: Fri Jan 20 10:47:10 2017

RTCMediaStreamTrackStats collected on a per-attachment basis.

According to recent spec change:
https://github.com/w3c/webrtc-stats/pull/138/files

This establishes the relationship between tracks and
[Voice/Video][Sender/Receiver]Info(s). Follow-up CLs will easily be able
to collect more stats from them.

BUG= webrtc:6757 ,  chromium:659137 ,  chromium:627816 

Review-Url: https://codereview.webrtc.org/2641763003
Cr-Commit-Position: refs/heads/master@{#16181}

[modify] https://crrev.com/9e30274c03c8e812abeb37c7876648e3cae0805a/webrtc/api/rtcstats_integrationtest.cc
[modify] https://crrev.com/9e30274c03c8e812abeb37c7876648e3cae0805a/webrtc/api/rtcstatscollector.cc
[modify] https://crrev.com/9e30274c03c8e812abeb37c7876648e3cae0805a/webrtc/api/rtcstatscollector_unittest.cc

Project Member

Comment 131 by bugdroid1@chromium.org, Jan 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/2d4d653e1fd25ade9ae768058b1225e6b430bc76

commit 2d4d653e1fd25ade9ae768058b1225e6b430bc76
Author: hbos <hbos@webrtc.org>
Date: Fri Jan 20 12:16:41 2017

Fix msan flake in rtcstats_integrationtest.cc.

This CL https://codereview.webrtc.org/2641763003 changed echo return
loss /...enhancement stats from being optional to being undefined
because that was the observed behavior (and a TODO was added to
investigate why).

It turns out that these stats are sometimes available, e.g. if the test
runs for a while like MSAN bot does, so this turned the test flaky.
Example failure:
https://build.chromium.org/p/client.webrtc/builders/Linux%20MSan/builds/8242

This CL reverts that change without reverting the rest of the CL which
other CLs depend on, and updates the TODO.

BUG= chromium:627816 
TBR=hta@webrtc.org
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2640743007
Cr-Commit-Position: refs/heads/master@{#16187}

[modify] https://crrev.com/2d4d653e1fd25ade9ae768058b1225e6b430bc76/webrtc/api/rtcstats_integrationtest.cc

Project Member

Comment 134 by bugdroid1@chromium.org, Jan 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0a67bd73b2f1e8755c46415a23b2792b6eaff6f

commit c0a67bd73b2f1e8755c46415a23b2792b6eaff6f
Author: hbos <hbos@chromium.org>
Date: Fri Jan 20 19:41:31 2017

Make hbos per-file OWNER of *webrtc*browsertest* in chrome/browser/media/webrtc.

BUG= 627816 

Review-Url: https://codereview.chromium.org/2645983003
Cr-Commit-Position: refs/heads/master@{#445135}

[modify] https://crrev.com/c0a67bd73b2f1e8755c46415a23b2792b6eaff6f/chrome/browser/media/webrtc/OWNERS

Project Member

Comment 135 by bugdroid1@chromium.org, Jan 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/webrtc.git/+/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61

commit 50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61
Author: hbos <hbos@webrtc.org>
Date: Mon Jan 23 15:21:55 2017

RTCMediaStreamTrackStats.framesDropped collected by RTCStatsCollector.

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-framesdropped
Implemented as frames_received - frames_rendered.

Part of this CL is adding frames_rendered to VideoReceiveStream::Stats
and updating it at ReceiveStatisticsProxy::OnRenderedFrame.

BUG= webrtc:6757 ,  chromium:659137 ,  chromium:627816 
NOTRY=True

Review-Url: https://codereview.webrtc.org/2607933002
Cr-Commit-Position: refs/heads/master@{#16213}

[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/api/stats/rtcstats_objects.h
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/media/base/mediachannel.h
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/media/engine/webrtcvideoengine2.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/media/engine/webrtcvideoengine2_unittest.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/pc/rtcstats_integrationtest.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/pc/rtcstatscollector.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/pc/rtcstatscollector_unittest.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/video/receive_statistics_proxy.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/video/receive_statistics_proxy_unittest.cc
[modify] https://crrev.com/50cfe1fda7f2b4a6a449fe7234f4c1aa2a475c61/webrtc/video_receive_stream.h

Comment 136 by hbos@webrtc.org, Jan 26 2017

Blockedon: -webrtc:6871

Comment 137 by hbos@webrtc.org, Jan 26 2017

Blockedon: -webrtc:6872

Comment 138 by hbos@chromium.org, Jan 26 2017

Blockedon: -682691

Comment 139 by hbos@webrtc.org, Jan 26 2017

Blockedon: -webrtc:6875

Comment 140 by hbos@chromium.org, Jan 26 2017

Blockedon: -680172

Comment 141 by hbos@chromium.org, Jan 26 2017

Mergedinto: webrtc:7060
Status: Duplicate (was: Started)
This bug has served as a master bug for all getStats work. That scope is larger than the scope of getting getStats unflagged, I will create a separate launch bug.

As for tracking what work remains for a complete and spec-compliant getStats, I'm merging this into a webrtc bug blocked on bugs describing remaining stats as opposed to bugs describing all stats now that they are partially implemented.

Comment 142 by hbos@chromium.org, Jan 26 2017

Labels: -M-58
Showing comments 44 - 143 of 143 Older

Sign in to add a comment