| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 |
| 11 | // This file contains enums related to IPv4/IPv6 metrics. |
| 12 |
| 13 | #ifndef API_UMA_METRICS_H_ |
| 14 | #define API_UMA_METRICS_H_ |
| 15 |
| 16 | #include "rtc_base/ref_count.h" |
| 17 |
| 18 | namespace webrtc { |
| 19 |
| 20 | // Currently this contains information related to WebRTC network/transport |
| 21 | // information. |
| 22 |
| 23 | // The difference between PeerConnectionEnumCounter and |
| 24 | // PeerConnectionMetricsName is that the "EnumCounter" is only counting the |
| 25 | // occurrences of events, while "Name" has a value associated with it which is |
| 26 | // used to form a histogram. |
| 27 |
| 28 | // This enum is backed by Chromium's histograms.xml, |
| 29 | // chromium/src/tools/metrics/histograms/histograms.xml |
| 30 | // Existing values cannot be re-ordered and new enums must be added |
| 31 | // before kBoundary. |
| 32 | enum PeerConnectionAddressFamilyCounter { |
| 33 | kPeerConnection_IPv4, |
| 34 | kPeerConnection_IPv6, |
| 35 | kBestConnections_IPv4, |
| 36 | kBestConnections_IPv6, |
| 37 | kPeerConnectionAddressFamilyCounter_Max, |
| 38 | }; |
| 39 |
| 40 | // This enum defines types for UMA samples, which will have a range. |
| 41 | enum PeerConnectionMetricsName { |
| 42 | kNetworkInterfaces_IPv4, // Number of IPv4 interfaces. |
| 43 | kNetworkInterfaces_IPv6, // Number of IPv6 interfaces. |
| 44 | kTimeToConnect, // In milliseconds. |
| 45 | kLocalCandidates_IPv4, // Number of IPv4 local candidates. |
| 46 | kLocalCandidates_IPv6, // Number of IPv6 local candidates. |
| 47 | kPeerConnectionMetricsName_Max |
| 48 | }; |
| 49 |
| 50 | // The IceCandidatePairType has the format of |
| 51 | // <local_candidate_type>_<remote_candidate_type>. It is recorded based on the |
| 52 | // type of candidate pair used when the PeerConnection first goes to a completed |
| 53 | // state. When BUNDLE is enabled, only the first transport gets recorded. |
| 54 | enum IceCandidatePairType { |
| 55 | // HostHost is deprecated. It was replaced with the set of types at the bottom |
| 56 | // to report private or public host IP address. |
| 57 | kIceCandidatePairHostHost, |
| 58 | kIceCandidatePairHostSrflx, |
| 59 | kIceCandidatePairHostRelay, |
| 60 | kIceCandidatePairHostPrflx, |
| 61 | kIceCandidatePairSrflxHost, |
| 62 | kIceCandidatePairSrflxSrflx, |
| 63 | kIceCandidatePairSrflxRelay, |
| 64 | kIceCandidatePairSrflxPrflx, |
| 65 | kIceCandidatePairRelayHost, |
| 66 | kIceCandidatePairRelaySrflx, |
| 67 | kIceCandidatePairRelayRelay, |
| 68 | kIceCandidatePairRelayPrflx, |
| 69 | kIceCandidatePairPrflxHost, |
| 70 | kIceCandidatePairPrflxSrflx, |
| 71 | kIceCandidatePairPrflxRelay, |
| 72 |
| 73 | // The following 9 types tell whether local and remote hosts have hostname, |
| 74 | // private or public IP addresses. |
| 75 | kIceCandidatePairHostPrivateHostPrivate, |
| 76 | kIceCandidatePairHostPrivateHostPublic, |
| 77 | kIceCandidatePairHostPublicHostPrivate, |
| 78 | kIceCandidatePairHostPublicHostPublic, |
| 79 | kIceCandidatePairHostNameHostName, |
| 80 | kIceCandidatePairHostNameHostPrivate, |
| 81 | kIceCandidatePairHostNameHostPublic, |
| 82 | kIceCandidatePairHostPrivateHostName, |
| 83 | kIceCandidatePairHostPublicHostName, |
| 84 | kIceCandidatePairMax |
| 85 | }; |
| 86 |
| 87 | enum KeyExchangeProtocolType { |
| 88 | kEnumCounterKeyProtocolDtls, |
| 89 | kEnumCounterKeyProtocolSdes, |
| 90 | kEnumCounterKeyProtocolMax |
| 91 | }; |
| 92 |
| 93 | enum KeyExchangeProtocolMedia { |
| 94 | kEnumCounterKeyProtocolMediaTypeDtlsAudio, |
| 95 | kEnumCounterKeyProtocolMediaTypeDtlsVideo, |
| 96 | kEnumCounterKeyProtocolMediaTypeDtlsData, |
| 97 | kEnumCounterKeyProtocolMediaTypeSdesAudio, |
| 98 | kEnumCounterKeyProtocolMediaTypeSdesVideo, |
| 99 | kEnumCounterKeyProtocolMediaTypeSdesData, |
| 100 | kEnumCounterKeyProtocolMediaTypeMax |
| 101 | }; |
| 102 |
| 103 | enum SdpSemanticRequested { |
| 104 | kSdpSemanticRequestDefault, |
| 105 | kSdpSemanticRequestPlanB, |
| 106 | kSdpSemanticRequestUnifiedPlan, |
| 107 | kSdpSemanticRequestMax |
| 108 | }; |
| 109 |
| 110 | enum SdpSemanticNegotiated { |
| 111 | kSdpSemanticNegotiatedNone, |
| 112 | kSdpSemanticNegotiatedPlanB, |
| 113 | kSdpSemanticNegotiatedUnifiedPlan, |
| 114 | kSdpSemanticNegotiatedMixed, |
| 115 | kSdpSemanticNegotiatedMax |
| 116 | }; |
| 117 |
| 118 | // Metric which records the format of the received SDP for tracking how much the |
| 119 | // difference between Plan B and Unified Plan affect users. |
| 120 | enum SdpFormatReceived { |
| 121 | // No audio or video tracks. This is worth special casing since it seems to be |
| 122 | // the most common scenario (data-channel only). |
| 123 | kSdpFormatReceivedNoTracks, |
| 124 | // No more than one audio and one video track. Should be compatible with both |
| 125 | // Plan B and Unified Plan endpoints. |
| 126 | kSdpFormatReceivedSimple, |
| 127 | // More than one audio track or more than one video track in the Plan B format |
| 128 | // (e.g., one audio media section with multiple streams). |
| 129 | kSdpFormatReceivedComplexPlanB, |
| 130 | // More than one audio track or more than one video track in the Unified Plan |
| 131 | // format (e.g., two audio media sections). |
| 132 | kSdpFormatReceivedComplexUnifiedPlan, |
| 133 | kSdpFormatReceivedMax |
| 134 | }; |
| 135 |
| 136 | // Metric for counting the outcome of adding an ICE candidate |
| 137 | enum AddIceCandidateResult { |
| 138 | kAddIceCandidateSuccess, |
| 139 | kAddIceCandidateFailClosed, |
| 140 | kAddIceCandidateFailNoRemoteDescription, |
| 141 | kAddIceCandidateFailNullCandidate, |
| 142 | kAddIceCandidateFailNotValid, |
| 143 | kAddIceCandidateFailNotReady, |
| 144 | kAddIceCandidateFailInAddition, |
| 145 | kAddIceCandidateFailNotUsable, |
| 146 | kAddIceCandidateMax |
| 147 | }; |
| 148 |
| 149 | // Metric for recording which api surface was used to enable simulcast. |
| 150 | enum SimulcastApiVersion { |
| 151 | kSimulcastApiVersionNone, |
| 152 | kSimulcastApiVersionLegacy, |
| 153 | kSimulcastApiVersionSpecCompliant, |
| 154 | kSimulcastApiVersionMax, |
| 155 | }; |
| 156 |
| 157 | } // namespace webrtc |
| 158 |
| 159 | #endif // API_UMA_METRICS_H_ |
| 160 |