25 Commits

Author SHA1 Message Date
hbos
d17a5a7709 RTCIceCandidateStats.deleted = false added.
Since previously, only the deleted = false case is supported, but now
that stat is added. It's a recent addition to the spec:
https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-deleted

BUG=webrtc:6756, chromium:632723, chromium:627816

Review-Url: https://codereview.webrtc.org/2591963003
Cr-Commit-Position: refs/heads/master@{#15871}
2017-01-02 16:09:59 +00:00
hbos
06495bcbb7 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}
2017-01-02 16:08:18 +00:00
hbos
c3a2b7f487 RTCIceCandidateStats.isRemote added and collected.
This was added to the spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatestats-isremote

BUG=webrtc:6756, chromium:632723, chromium:627816

Review-Url: https://codereview.webrtc.org/2595003003
Cr-Commit-Position: refs/heads/master@{#15863}
2017-01-02 12:46:15 +00:00
hbos
3168c7a04b Rename RTCOutboundRTPStreamStats *_rtt members to *_round_trip_time.
The spec renamed these recently:
https://w3c.github.io/webrtc-stats/#since-21-sep-2016*

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2576383002
Cr-Commit-Position: refs/heads/master@{#15630}
2016-12-15 14:17:15 +00:00
hbos
e448dd5355 RTCIceCandidatePairStats.consentRequestsSent set by RTCStatsCollector
and requestsSent is updated.

Before:
  requestsSent = total ping requests
Now
  requestsSent = pings sent before first response
  consentRequestsSent = pings after first response

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-consentrequestssent

BUG=chromium:633550

Review-Url: https://codereview.webrtc.org/2558293002
Cr-Commit-Position: refs/heads/master@{#15541}
2016-12-12 09:22:59 +00:00
hbos
02cd4d6dfc RTCInboundRTPStreamStats.packetsLost set by RTCStatsCollector.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-packetslost

BUG=chromium:657855

Review-Url: https://codereview.webrtc.org/2559973002
Cr-Commit-Position: refs/heads/master@{#15507}
2016-12-09 12:19:50 +00:00
hbos
d82f5125b7 RTCIceCandidatePairStats.requestsReceived defined by RTCStatsCollector.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-requestsreceived

BUG=chromium:633550

Review-Url: https://codereview.webrtc.org/2565463002
Cr-Commit-Position: refs/heads/master@{#15506}
2016-12-09 12:12:45 +00:00
hbos
0583b286e4 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}
2016-11-30 09:50:36 +00:00
hbos
42eee12614 RTCPeerConnectionStats: Removed fixed TODO comments.
I forget to remove these when fixing them.

BUG=chromium:636818
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2522023003
Cr-Commit-Position: refs/heads/master@{#15215}
2016-11-23 15:43:32 +00:00
hbos
0adb8285b1 RTCCodecStats[1] added.
RTCStatsCollector supports "payloadType", "codec" and "clockRate".
"channels", "parameters" and "implementation" need to be supported
before closing crbug.com/659117.

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

BUG=chromium:659117, chromium:627816, chromium:657854
NOTRY=True

Review-Url: https://codereview.webrtc.org/2509803004
Cr-Commit-Position: refs/heads/master@{#15207}
2016-11-23 10:32:14 +00:00
hbos
09bc128603 RTCMediaStream[Track]Stats added.
Not all members are collected by RTCStatsCollector and detached tracks
are not visible in the returned stats. This needs to be addressed before
closing crbug.com/660827 and crbug.com/659137

BUG=chromium:660827, chromium:659137, chromium:627816

Review-Url: https://codereview.webrtc.org/2467873005
Cr-Commit-Position: refs/heads/master@{#14978}
2016-11-08 14:29:26 +00:00
hbos
eeafe94f28 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*

  Re-landed after having to be reverted
  https://codereview.webrtc.org/2470683002/ due to depending on a CL
  that was reverted. Now that that has re-landed
  https://codereview.webrtc.org/2470703002/ this is ready to re-land.

BUG=chromium:627816, chromium:657855, chromium:657854
R=hta@webrtc.org
TBR=deadbeef@webrtc.org

Review-Url: https://codereview.webrtc.org/2465173003
Cr-Commit-Position: refs/heads/master@{#14868}
2016-11-01 10:00:24 +00:00
hbos
6ded190864 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}
2016-11-01 08:50:52 +00:00
perkj
7eaa83622b 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}
2016-11-01 06:52:28 +00:00
perkj
4ed075034a 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}
2016-11-01 06:51:00 +00:00
hbos
0d7bf16940 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

Review-Url: https://codereview.webrtc.org/2452043002
Cr-Commit-Position: refs/heads/master@{#14861}
2016-10-31 22:31:09 +00:00
hbos
69e9cb0828 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}
2016-10-31 21:48:44 +00:00
hbos
5d79a7cb1f 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}
2016-10-24 16:27:17 +00:00
hbos
2fa7c67675 RTCTransportStats[1] added, supporting all members.
Address TODO in rtcstatscollector_unittest.cc before closing 653873.

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

BUG=chromium:653873, chromium:633550, chromium:627816

Review-Url: https://codereview.webrtc.org/2408363002
Cr-Commit-Position: refs/heads/master@{#14740}
2016-10-24 11:00:12 +00:00
hbos
cc555c5019 RTCDataChannelStats[1] added, supporting all stats members.
Also updates MockDataChannel to also mock id, messages_sent, bytes_sent,
messages_received and bytes_received.

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

BUG=chromium:654927, chromium:627816

Review-Url: https://codereview.webrtc.org/2420473002
Cr-Commit-Position: refs/heads/master@{#14670}
2016-10-18 19:48:37 +00:00
hbos
c47a0c3ac4 RTCIceCandidatePairStats[1] added.
Note: In this initial CL most stats members are missing. This needs to
be addressed before closing the RTCIceCandidatePairStats bug
(crbug.com/633550).

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

BUG=chromium:633550, chromium:627816

Review-Url: https://codereview.webrtc.org/2390693003
Cr-Commit-Position: refs/heads/master@{#14604}
2016-10-11 21:54:55 +00:00
hbos
ab9f6e4dea RTCIceCandidateStats[1] added.
The RTCStatsCollector collects candidates from candidate pairs. Note
that there may be other candidates that are not paired with anything,
stats for these should also be produced before closing crbug.com/632723.

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

BUG=chromium:627816, chromium:632723

Review-Url: https://codereview.webrtc.org/2384143002
Cr-Commit-Position: refs/heads/master@{#14565}
2016-10-07 09:18:55 +00:00
hbos
fc5e0504ea 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}
2016-10-06 09:06:16 +00:00
hbos
6ab97ce0b9 RTCCertificateStats[1] added.
[1] https://w3c.github.io/webrtc-stats/#certificatestats-dict*

BUG=chromium:627816, chromium:629436
NOTRY=True

Review-Url: https://codereview.webrtc.org/2243123002
Cr-Commit-Position: refs/heads/master@{#14484}
2016-10-03 21:17:03 +00:00
hbos
74e1a4f96a PeerConnection[Interface]::GetStats(RTCStatsCollectorCallback*) added.
New file structure and targets:

rtc_stats_api
  webrtc/api/stats/rtcstats.h
  webrtc/api/stats/rtcstats_objects.h
  webrtc/api/stats/rtcstatsreport.h

rtc_stats (dep on rtc_stats_api)
  webrtc/stats/rtcstats.cc
  webrtc/stats/rtcstats_objects.cc
  webrtc/stats/rtcstatsreport.cc

libjingle_peerconnection (dep on rtc_stats)
  webrtc/api/rtcstatscollector.cc
  webrtc/api/rtcstatscollector.h

Placing rtc_stats_api headers in this separate target instead of
libjingle_peerconnection avoids a circular dependency
libjingle_peerconnection -> rtc_stats -> libjingle_peerconnection

Code changes:

PeerConnectionInterface::GetStats(RTCStatsCollectorCallback*) added for
the new stats collection API. Implemented by PeerConnection.

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2331373004
Cr-Commit-Position: refs/heads/master@{#14246}
2016-09-16 06:33:04 +00:00