Report UMA metrics for received SDP format
This change adds UMA stats that record the format of the remote offered
SDP. There are three classifications for the SDP format:
- Simple: No more than one audio and one video. Should be compatible
with both Plan B and Unified Plan endpoints.
- ComplexPlanB: More than one audio or more than one video in the Plan B
format (e.g., one audio mline with multiple streams).
- ComplexUnifiedPlan: More than one audio or more than one video in the
Unified Plan format (e.g., two audio mlines).
Bug: chromium:811683
Change-Id: If46394edfa6a812ef313d632e27ec27516c18867
Reviewed-on: https://webrtc-review.googlesource.com/57220
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22315}
diff --git a/api/umametrics.h b/api/umametrics.h
index a2d055d..4de1ce4 100644
--- a/api/umametrics.h
+++ b/api/umametrics.h
@@ -41,6 +41,7 @@
kEnumCounterSdpSemanticRequested,
kEnumCounterSdpSemanticNegotiated,
kEnumCounterKeyProtocolMediaType,
+ kEnumCounterSdpFormatReceived,
kPeerConnectionEnumCounterMax
};
@@ -146,6 +147,24 @@
kSdpSemanticNegotiatedMax
};
+// Metric which records the format of the received SDP for tracking how much the
+// difference between Plan B and Unified Plan affect users.
+enum SdpFormatReceived {
+ // No audio or video tracks. This is worth special casing since it seems to be
+ // the most common scenario (data-channel only).
+ kSdpFormatReceivedNoTracks,
+ // No more than one audio and one video track. Should be compatible with both
+ // Plan B and Unified Plan endpoints.
+ kSdpFormatReceivedSimple,
+ // More than one audio track or more than one video track in the Plan B format
+ // (e.g., one audio media section with multiple streams).
+ kSdpFormatReceivedComplexPlanB,
+ // More than one audio track or more than one video track in the Unified Plan
+ // format (e.g., two audio media sections).
+ kSdpFormatReceivedComplexUnifiedPlan,
+ kSdpFormatReceivedMax
+};
+
class MetricsObserverInterface : public rtc::RefCountInterface {
public:
// |type| is the type of the enum counter to be incremented. |counter|