Commit graph

131 commits

Author SHA1 Message Date
Philipp Hancke
1f98b466b8 stats: rename RTCInboundRTPStreamStats and RTCOutboundRTPStreamStats
to RTCInboundRtpStreamStats and RTCOutboundRtpStreamStats respectively
which follows the camel-casing convention used elsewhere.

The old name is kept around as an alias for a limited amount of time
to allow upgrading dependencies.

BUG=webrtc:14973

Change-Id: Ibf4e65933fd6cc2e7e89955042f6f8fb0f6c7853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296261
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39497}
2023-03-07 14:27:47 +00:00
Philipp Hancke
1f80451932 Fix stats inheritance and rename RTP to Rtp
making RTCOutboundRtpStreamStats inherit from RTCSentRtpStreamStats
as defined in
  https://www.w3.org/TR/webrtc-stats/#outboundrtpstats-dict*

This removes the duplicated definitions of packetsSent and bytesSent.

BUG=webrtc:14948

Change-Id: I184998b65d59dbd0d1288733d55d8a884e6de970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39481}
2023-03-06 13:43:27 +00:00
Philipp Hancke
e5ab6c3bb0 stats: remove deprecated timestamp_us constructor variant
BUG=webrtc:14813

Change-Id: I56d28385f679b399cb2059f4c4c3d43e84a89b8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293580
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39346}
2023-02-20 12:18:42 +00:00
Fredrik Hernqvist
5adc2b6969 Correct RTCAudioPlayoutStats type and add kind field.
Bug: webrtc:14653
Change-Id: Idb85ce440620fc5b818a3b23a63ac062a443cc81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291330
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39196}
2023-01-25 14:30:41 +00:00
Fredrik Hernqvist
828de8036d Populate RTCInboundRtpStreamStats::playoutId when appropriate
Bug: webrtc:14653
Change-Id: I0c59604b218d0839a126c02914626b8ed2bee76c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291040
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39149}
2023-01-19 15:44:36 +00:00
Fredrik Hernqvist
efbe753617 Add RTCAudioPlayoutStats to GetStats().
This is done by allowing implementations of AudioDeviceModule to
implement the GetStats() method. The default implementation returns
nullopt, in which case RTCAudioPlayoutStats will not be visible in the
stats.

Bug: webrtc:14653
Change-Id: I8e4aa6f1b8fcfa47a30f633d28a4013191752e20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290563
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39115}
2023-01-16 13:19:45 +00:00
Philipp Hancke
e137c4592e stats: deprecate timestamp_us constructor and method
in favor of the Timestamp constructor and method.
The constructor is most likely not used outside libWebRTC,
the call to
  .timestamp_us()
can be replaced with
  .timestamp().us()

BUG=webrtc:14813

Change-Id: Id166b4f85b2425ecec1c7ebb81406f82ff9d95c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290727
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39066}
2023-01-11 11:40:05 +00:00
Philipp Hancke
b81823a5f0 stats: use Timestamp instead of uint64_t
making it clear what unit is being used.

BUG=webrtc:13756

Change-Id: I6354d35a8e02bb93a905ccf32cb0b294b4813e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39008}
2023-01-05 08:37:31 +00:00
Philipp Hancke
7a5de44455 api: use std::string in stats constructor
instead of const reference or rvalues. This follows the style guide:
  https://google.github.io/styleguide/cppguide.html#Rvalue_references

BUG=webrtc:14807

Change-Id: I936b99146520815ae8105806409d46565fa83546
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289985
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38996}
2023-01-04 10:44:24 +00:00
Evan Shrubsole
9b235cd93b Add scalability mode to RTCOutboundRtpStreamStats stats
This is in the webrtc-stats spec at
https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-scalabilitymode.

This adds the scalability mode to CodecSpecificInfo which is used to
plumb the modes for each simulcast layer.

TBR=orphis@webrtc.org

Tested: Compiled into Chrome and confirmed the scalability mode set for AV1, VP9, VP8 and H264 software encoders in chrome://webrtc-internals.
Bug: webrtc:14730
Change-Id: I71ceba8f6485a4f4a73e0856031b8d5f16f913f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285085
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38847}
2022-12-08 11:46:06 +00:00
Evan Shrubsole
f4abcc0bbb [stats] Mark codec implementation stats as exposing hardware capability
This means that these stats will be filtered out by JavaScript unless
the conditions for exposing hardware capabilities are met. These
conditions are described in the webrtc-stats spec at
https://w3c.github.io/webrtc-stats/#limiting-exposure-of-hardware-capabilities.

R=hbos@webrtc.org

Bug: chromium:1369050,chromium:1369049
Change-Id: I05bdb72ef6789417488c7e786e8713ce99a91f8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279960
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38594}
2022-11-09 13:55:18 +00:00
Evan Shrubsole
13c0be44b3 Add power efficient stats to RTC stats
As the exposure of power efficient stats to JavaScript are limited as
to reduce the fingerprinting surface to getStats, a new RTCStatsMember
derivation, RTCLimitedStatsMember, was added in this change. This sets
the exposure criteria of the stat on the type, which keeps the size of
the RTCStatsMember class the same and allows for extension in the future
for new types of stat restrictions.

Bug: webrtc:14483
Change-Id: Ib0303050a112441ba2416fd5f004dd8be26b47ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279021
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38576}
2022-11-08 08:35:47 +00:00
Philipp Hancke
0487c5797a stats: implement candidate-pair lastPacket(Sent|Received)Timestamp
https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-lastpacketsenttimestamp
https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-lastpacketreceivedtimestamp

which are useful together with the ice-restart-necessary logic mentioned
in
  https://w3c.github.io/webrtc-pc/#dictionary-rtcofferoptions-members

BUG=webrtc:14619

Change-Id: I4a8ab00a37fbd4af8b948720c83787cbdfc6b9a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281281
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38534}
2022-11-02 12:16:21 +00:00
Henrik Boström
adbcbf73fa [Stats] Delete 'track' metrics that have previously been moved.
These have all been moved to "inbound-rtp" and now that upstream
projects have migrated we can delete the old location.

Unblocks https://crbug.com/webrtc/14175

Bug: webrtc:14521, webrtc:14524
Change-Id: Ia2bfa399d62304cc0ead0e65c340dfad20acc530
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281183
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38532}
2022-11-02 09:21:04 +00:00
Henrik Boström
45b35d442d Unship track.totalFramesDuration/sumSquaredFrameDurations.
These metrics were not only non-standard, but residing in the
non-standard "track" stats object that we want to delete. As per
https://github.com/w3c/webrtc-stats/issues/695#issuecomment-1259611462
these metrics are no longer needed because we already have
inbound-rtp.totalInterFrameDelay/totalSquaredInterFrameDelay which is
basically the same thing.

// mac_rel infra failures are unrelated
NOTRY=True

Bug: webrtc:14522
Change-Id: I565da42514a93f15532ba8357dd006547a5296ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278100
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38509}
2022-10-31 15:09:10 +00:00
Henrik Boström
aebba7b468 [Stats] Expose totalPacketSendDelay for audio as well.
This information is now readily available. Let's expose it.

In practise we don't pace audio by default and the delay is ~0, however
we can tell that this metric is working as intended by setting
PacingController's pace_audio_ to true via the "WebRTC-Pacer-BlockAudio"
field trial. In this case chrome://webrtc-internals/ plots neats graphs
for audio send delay.

Bug: webrtc:10635
Change-Id: Iecfd93bb84ec61e5d54232769a9e7a500601b199
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280523
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38483}
2022-10-27 10:33:16 +00:00
Henrik Boström
c5f8f800a2 [Stats] Add googTimingFrameInfo to the modern API.
This is exposing something that is already exposed in the legacy
getStats() API and is only available if the "video-timing" header
extension is used. Adding this metric here should unblock legacy
getStats() API deprecation. The follow-up to unship or standardize this
metric is tracked by https://crbug.com/webrtc/14586.

Bug: webrtc:14587
Change-Id: Ic3d45b0558d7caf4be2856a4cd95b88db312f85e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38444}
2022-10-19 17:02:18 +00:00
Henrik Boström
15166b2fa4 [ModernStats] Mark obsolete stats as [[deprecated]].
This includes the stats dictionaries that have been made obsolete in
the spec and whose IDs are prefixed "DEPRECATED_":
- RTCMediaStreamTrackStats
- RTCMediaStreamStats

There is an ongoing experiment to unship these stats dictionaries in
Chrome (https://crbug.com/1374215). Marking then as [[deprecated]] helps
alert other dependencies that these classes are deprecated.

In the meantime, the "DEPRECATED_RTCMediaStreamTrackStats" prefix makes
it possible to use the deprecated classes.

# Unrelated infra failures
NOTRY=True

Bug: webrtc:14175, webrtc:14419
Change-Id: I498d370294058a628278e1e5b027cd12e24ad31a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279700
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38439}
2022-10-19 09:58:37 +00:00
Philipp Hancke
95d880291f stats: make inbound-rtp frame assembly time standard
standardized in
  https://github.com/w3c/webrtc-stats/pull/694

BUG=webrtc:13986

Change-Id: Ia24e7fa64a48ad6c88882c90fd03bd1d89408ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278789
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38390}
2022-10-13 15:14:38 +00:00
Henrik Boström
2fb83072db Move more non-standard metrics to inbound-rtp.
They may be non-standard, but they shouldn't be on a stats dictionary
that is deprecated (track is going away soon-ish). By moving them to
inbound-rtp they can continue to exist beyond track deprecation and
live in the right place in case we decide to standardize them later.

To help downstream projects transitions, the metrics are temporarily
available in both old and new locations. Delete of old location will
happen in a follow-up CL. TODOs added.

Bug: webrtc:14524
Change-Id: I2008060fa4ba76cde859d9144d2bb9648c7ff9af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38315}
2022-10-07 07:22:04 +00:00
Henrik Boström
c57a28c46b Move pause and freeze metrics to standardized location.
These metrics were recently standardized. Part of the standardization
effort was to move them from obsolete "track" stats (on track for
deprecation and removal: https://crbug.com/webrtc/14175) into the
"inbound-rtp" stats which are not deprecated.

To ease transition for downstream projects, the metrics are temporarily
duplicated in both the old and new locations. In a follow-up CL, they
will be deleted from "track".

Bug: webrtc:14521
Change-Id: I0d9036472607a8c717ec823a458a79a49ddb80c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38308}
2022-10-06 10:52:22 +00:00
Henrik Boström
a494e4b517 Move packetsDiscarded to inbound-rtp.
packetsDiscarded was previously moved to RTCInboundRtpStreamStats:
https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*

Bug: webrtc:14514
Change-Id: I322b64ede4e64cef1c8234e9626121d96d945355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277820
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38297}
2022-10-05 09:00:18 +00:00
Philipp Hancke
0e3cd63062 stats: add missing ice candidate stats
added in https://github.com/w3c/webrtc-stats/pull/611
* foundation
* relatedAddress
* relatedPort
* usernameFragment
* tcpType

BUG=webrtc:14480

Change-Id: I5f43373fbbc7c780b8dafb6e2ace2c27f5e22970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276780
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38292}
2022-10-04 18:02:28 +00:00
Byoungchan Lee
636dc3d208 Implement RTCOutboundRtpStreamStats.targetBitrate for video
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate

Bug: webrtc:13394
Change-Id: I4749b38088a24d1a775137d5fe2c65f96effd185
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276380
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38170}
2022-09-22 12:37:30 +00:00
Philipp Hancke
684e241323 stats: implement outbound-rtp.active
implementing
  https://github.com/w3c/webrtc-stats/pull/649

BUG=webrtc:14291

Change-Id: Ib8453d4d7c335834cd8dd2aa29111aef26211dff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269520
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#37639}
2022-07-28 13:35:40 +00:00
Ivo Creusen
1a84b565ac Implement RTCInboundRTPStreamStats.JitterBufferMinimumDelay
This metric was recently added to the standard (see https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-jitterbufferminimumdelay). This CL implements it for audio streams.

Bug: webrtc:14141
Change-Id: I79d918639cd12361ebbc28c2be41549e33fa7e2a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262770
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37567}
2022-07-20 09:14:03 +00:00
Ivo Creusen
11fdb08282 Implement RTCInboundRTPStreamStats.JitterBufferTargetDelay
This CL also removes the existing non-standard implementation of the metric.

Bug: webrtc:14147, webrtc:11789
Change-Id: I70fd1c451dfd59380fe5ce959086f37b31697c16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265360
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37441}
2022-07-05 11:34:53 +00:00
Henrik Boström
1ab61886a9 Implement Outbound/InboundRtpStreamStats.mid.
This is what allowed us to remove "transceiver" stats from the spec.

Bug: webrtc:14191
Change-Id: I687a2dd97de016832005cb4271f6e1a0e0560cd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266022
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#37247}
2022-06-17 08:44:09 +00:00
Henrik Boström
a6c7d5c8ce Implement RTCInboundRtpStreamStats.trackIdentifier.
This should allow standard stats users not to have to rely on the
obsolete "track" stats.

Bug: webrtc:14174
Change-Id: I24e5e1478ee47c73c12fcdecf7314f41fcc76bc7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266020
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37246}
2022-06-17 08:32:09 +00:00
Henrik Boström
5abfc920b5 Reland "[Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs."
This is a reland of commit 626f87d905

Original change's description:
> [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
>
> In preparation for the spec moving closer to PR, let's not have
> placeholder metrics not implemented.
>
> Bug: webrtc:14167
> Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37205}

Bug: webrtc:14167
Change-Id: Ib12488fb8510fb3430e92bcd72d88c7879ecb0ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265861
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37226}
2022-06-15 15:03:18 +00:00
Henrik Boström
67d2d35443 Revert "Reland "[Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.""
This reverts commit 2843bbc96d.

Reason for revert: Even more references to unimplemented metrics remaining...

Original change's description:
> Reland "[Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs."
>
> This is a reland of commit 626f87d905
>
> Original change's description:
> > [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
> >
> > In preparation for the spec moving closer to PR, let's not have
> > placeholder metrics not implemented.
> >
> > Bug: webrtc:14167
> > Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Henrik Boström <hbos@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37205}
>
> Bug: webrtc:14167
> Change-Id: Ifdc37e7a48fea516c727c06d2f510780386cb204
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265805
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37215}

Bug: webrtc:14167
Change-Id: I959d61512d5896224302a70aadbac6f75afc819e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265810
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#37217}
2022-06-15 08:11:48 +00:00
Henrik Boström
2843bbc96d Reland "[Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs."
This is a reland of commit 626f87d905

Original change's description:
> [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
>
> In preparation for the spec moving closer to PR, let's not have
> placeholder metrics not implemented.
>
> Bug: webrtc:14167
> Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37205}

Bug: webrtc:14167
Change-Id: Ifdc37e7a48fea516c727c06d2f510780386cb204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265805
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37215}
2022-06-15 06:29:38 +00:00
Henrik Boström
378b1c6826 Revert "[Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs."
This reverts commit 626f87d905.

Reason for revert: Breaks one downstream project, will re-land after the dependency stops referencing an unimplemented RTT metric

Original change's description:
> [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
>
> In preparation for the spec moving closer to PR, let's not have
> placeholder metrics not implemented.
>
> Bug: webrtc:14167
> Change-Id: If4688ef85b57f88154d490186b306b30414874e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37205}

Bug: webrtc:14167
Change-Id: I7e9ac60eb474b44fab678d4c08ddcae846ce456c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265800
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37206}
2022-06-14 08:48:37 +00:00
Henrik Boström
626f87d905 [Stats] Cleanup: Remove unimplemented metrics and obsolete TODOs.
In preparation for the spec moving closer to PR, let's not have
placeholder metrics not implemented.

Bug: webrtc:14167
Change-Id: If4688ef85b57f88154d490186b306b30414874e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265383
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37205}
2022-06-14 07:46:57 +00:00
Philipp Hancke
6fb8d1a2d7 stats: expose minPlayoutDelay as nonstandard stat
This currently only exists as a goog legacy stat and has no spec
equivalent according to
  https://docs.google.com/document/d/1z-D4SngG36WPiMuRvWeTMN7mWQXrf1XKZwVl3Nf1BIE/edit
Yet it is useful to debug issues sometimes. Exposing it as a
nonstandard stat will make it show up in chrome://webrtc-internals,
removing a need to switch to the legacy stats API there.

BUG=webrtc:14118

Change-Id: I506357ad54ff33df3ba46fb81558aa32187ac8e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264420
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37055}
2022-05-31 10:05:35 +00:00
Philipp Hancke
0359ba2225 stats: add frame assembly time stats
implements a total frame assembly time statistic that measures the
cumulative time between the arrival of the first packet of a frame
(the lowest reception time) and the time all packets of the frame have
been received (i.e. the highest reception time)

This is similar to totalProcessingDelay
  https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay
in particular with respect to only being incremented for frames that are being decoded but does not include the amount of time spent decoding the frame.

This statistic is useful for evaluating mechanisms like NACK and FEC
and gives some insight into the behavior of the pacer sending the
packets.
Note that for frames with just a single packet the assembly time will be zero. In order to calculate an average assembly time an additional frames_assembled_from_multiple_packets counter for frames with more than a single packet is added.

Currently this is a nonstandard stat so will only show up in webrtc-internals and not in getStats. Formally it can be defined as

totalAssemblyTime of type double
	Only exists for video. 	The sum of the time, in seconds, each video frame takes from the time the first RTP packet is received (reception timestamp) and to the time the last RTP packet of a frame is received.
    Given the complexities involved, the time of arrival or the reception timestamp is measured as close to the network layer as possible.

    This metric is not incremented for frames that are not decoded, i.e., framesDropped, partialFramesLost or frames that fail decoding for other reasons (if any). Only incremented for frames consisting of more than one RTP packet. The average frame assembly time can be calculated by dividing the totalAssemblyTime with framesAssembledFromMultiplePacket.

framesAssembledFromMultiplePacket of type unsigned long
	Only exists for video. It represents the total number of frames correctly decoded for this RTP stream that consist of more than one RTP packet.
	For such frames the totalAssemblyTime is incremented.

BUG=webrtc:13986

Change-Id: Ie0ae431d72a57a0001c3240daba8eda35955f04e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260920
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36922}
2022-05-18 09:16:10 +00:00
Philipp Hancke
1f49157b41 stats: implement transport iceState
https://w3c.github.io/webrtc-stats/#dom-rtctransportstats-selectedcandidatepairid

BUG=webrtc:14022

Change-Id: I206bff7048d2df3e3aff0af55072097f49d54e8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261720
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36840}
2022-05-10 13:55:21 +00:00
Philipp Hancke
95b1a3497c stats: implement iceLocalUsernameFragment
https://www.w3.org/TR/webrtc-stats/#dom-rtctransportstats-icelocalusernamefragment

BUG=webrtc:14022

Change-Id: If56ebe66d83f4e535c2245f2ca3848469914679f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261243
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36772}
2022-05-05 08:08:48 +00:00
Philipp Hancke
cc1b9b060d stats: implement iceRole
https://www.w3.org/TR/webrtc-stats/#dom-rtctransportstats-icerole

BUG=webrtc:14022

Change-Id: I88de2c843a2042ce99076d55ce41be22589e2d92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261201
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36766}
2022-05-05 05:05:40 +00:00
Philipp Hancke
a16a6a6341 stats: implement inbound-rtp totalProcessingDelay for video
https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay

BUG=webrtc:13984

Change-Id: Ifd821bd8553add46218f09a11366096d62f5d09f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259768
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36732}
2022-05-02 10:56:22 +00:00
Philipp Hancke
69c1df2f44 stats: add dtlsRole to transport
https://w3c.github.io/webrtc-stats/#dom-rtctransportstats-dtlsrole

BUG=webrtc:13978

Change-Id: Ib158427d2df0307884381bdd46c411f60f56a371
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259761
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36730}
2022-05-02 10:13:54 +00:00
Philipp Hancke
a3b5c4e027 test: replace media_type with kind
media_kind is the old name (that is kept around since we can't deprecate)

BUG=None

Change-Id: I445441a54bb4ff408502d1aba6834cdac874324b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259766
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36625}
2022-04-22 14:53:08 +00:00
Jonas Oreland
0d13bbd4b1 Extend RTCIceCandidateStats with non-standard network_adapter_type
This cl/ extends the RTCIceCandidateStats object with
network_adapter_type and vpn, so that it maps the underlying
WebRTC objects completly.

Bug: webrtc:13773
Change-Id: I5cf79972c60ca6bf2a127dc96fa90811263ba6fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253241
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36110}
2022-03-02 11:13:18 +00:00
Philipp Hancke
05b29c7701 stats: collect RTCIceCandidate url
BUG=webrtc:13652

Change-Id: I80eaa11eb9c6ff3523cbd48d47dd68beb39d5188
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250200
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#35900}
2022-02-03 13:40:41 +00:00
Byoungchan Lee
efe46b6bee Change the type of RTCVideoSourceStats.framesPerSecond
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcvideosourcestats-framespersecond

Bug: webrtc:12905
Change-Id: If53e2e480e2d6f687c3f8bb95a9e1d1e386fe9c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237420
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35352}
2021-11-16 11:21:41 +00:00
Jakob Ivarsson
bf0874568c Implement RTCOutboundRtpStreamStats.targetBitrate for audio.
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate

Bug: webrtc:13377
Change-Id: I98dd263e0b9d6e2ca94969d2a91857b14cd65f70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237402
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35337}
2021-11-12 09:24:34 +00:00
Taylor Brandstetter
79326eaca7 Implement missing candidate pair packets/bytes sent/received stats.
Specifically:
* packetsSent
* packetsReceived
* packetsDiscardedOnSend
* bytesDiscardedOnSend

Bug: webrtc:10569
Change-Id: Id92c20b93dea57637239a6321bd8aa644867f272
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232961
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35113}
2021-09-28 23:27:05 +00:00
Ivo Creusen
2562cf0105 Reland "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit 2c41cbae37.

Reason for revert: The breaking test in Chromium has been temporarily disabled in https://chromium-review.googlesource.com/c/chromium/src/+/3139794/2.

Original change's description:
> Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
>
> This reverts commit fb0dca6c05.
>
> Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.
>
> Original change's description:
> > Wire up non-sender RTT for audio, and implement related standardized stats.
> >
> > The implemented stats are:
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> > - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
> >
> > Bug: webrtc:12951, webrtc:12714
> > Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34861}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=hta,hbos,minyue
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Olga Sharonova <olka@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34897}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:12951, webrtc:12714
Change-Id: I786b06933d85bdffc5e879bf52436bb3469b7f3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231181
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34930}
2021-09-06 14:26:55 +00:00
Björn Terelius
2c41cbae37 Revert "Wire up non-sender RTT for audio, and implement related standardized stats."
This reverts commit fb0dca6c05.

Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.

Original change's description:
> Wire up non-sender RTT for audio, and implement related standardized stats.
>
> The implemented stats are:
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34861}

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR=hta,hbos,minyue

Bug: webrtc:12951, webrtc:12714
Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34897}
2021-09-01 17:32:00 +00:00
Ivo Creusen
fb0dca6c05 Wire up non-sender RTT for audio, and implement related standardized stats.
The implemented stats are:
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
- https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements

Bug: webrtc:12951, webrtc:12714
Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34861}
2021-08-30 09:03:50 +00:00