aboutsummaryrefslogtreecommitdiff
path: root/stats
diff options
context:
space:
mode:
authorJonas Oreland <jonaso@webrtc.org>2019-08-28 08:10:27 +0200
committerCommit Bot <commit-bot@chromium.org>2019-08-28 13:22:08 +0000
commit149dc72dfa9a49fa348b529f4e21776a95949d2f (patch)
tree5d20f6a28221a19d7c1158ae146bb7e4b9554c57 /stats
parent3b69817e621f0f8ab3a7002eac3b70ab4b070b49 (diff)
downloadwebrtc-149dc72dfa9a49fa348b529f4e21776a95949d2f.tar.gz
Add support for RTCTransportStats.selectedCandidatePairChanges
This patch adds accounting and reporting needed for newly added RTCTransportStats.selectedCandidatePairChanges, https://w3c.github.io/webrtc-stats/#dom-rtctransportstats-selectedcandidatepairchanges a) P2PTransportChannel counts everytime selected_connection_ is modified and reports this counter in the GetStats()-call. b) RTCStatsCollector puts the counter into the standardized stats object. Bug: webrtc:10900 Change-Id: Ibaeca18706b8edcbcb44b0c6f2754854bcb545ba Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149830 Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28987}
Diffstat (limited to 'stats')
-rw-r--r--stats/rtcstats_objects.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc
index 4815640de0..9ecb2a5622 100644
--- a/stats/rtcstats_objects.cc
+++ b/stats/rtcstats_objects.cc
@@ -868,7 +868,8 @@ WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport",
&dtls_state,
&selected_candidate_pair_id,
&local_certificate_id,
- &remote_certificate_id)
+ &remote_certificate_id,
+ &selected_candidate_pair_changes)
// clang-format on
RTCTransportStats::RTCTransportStats(const std::string& id,
@@ -883,7 +884,8 @@ RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us)
dtls_state("dtlsState"),
selected_candidate_pair_id("selectedCandidatePairId"),
local_certificate_id("localCertificateId"),
- remote_certificate_id("remoteCertificateId") {}
+ remote_certificate_id("remoteCertificateId"),
+ selected_candidate_pair_changes("selectedCandidatePairChanges") {}
RTCTransportStats::RTCTransportStats(const RTCTransportStats& other)
: RTCStats(other.id(), other.timestamp_us()),
@@ -893,7 +895,8 @@ RTCTransportStats::RTCTransportStats(const RTCTransportStats& other)
dtls_state(other.dtls_state),
selected_candidate_pair_id(other.selected_candidate_pair_id),
local_certificate_id(other.local_certificate_id),
- remote_certificate_id(other.remote_certificate_id) {}
+ remote_certificate_id(other.remote_certificate_id),
+ selected_candidate_pair_changes(other.selected_candidate_pair_changes) {}
RTCTransportStats::~RTCTransportStats() {}