Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1201)

Side by Side Diff: talk/app/webrtc/umametrics.h

Issue 1277263002: Add instrumentation to track the IceEndpointType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 14 matching lines...) Expand all
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 // This file contains enums related to IPv4/IPv6 metrics. 28 // This file contains enums related to IPv4/IPv6 metrics.
29 29
30 #ifndef TALK_APP_WEBRTC_UMAMETRICS_H_ 30 #ifndef TALK_APP_WEBRTC_UMAMETRICS_H_
31 #define TALK_APP_WEBRTC_UMAMETRICS_H_ 31 #define TALK_APP_WEBRTC_UMAMETRICS_H_
32 32
33 namespace webrtc { 33 namespace webrtc {
34 34
35 // Used to specify which enum counter type we're incrementing in
36 // MetricsObserverInterface::IncrementEnumCounter.
37 enum PeerConnectionEnumCounterType {
38 kEnumCounterAddressFamily,
39 // For the next 2 counters, we track them separately based on the "first hop"
40 // protocol used by the local candidate. "First hop" means the local candidate
41 // type in the case of non-TURN candidates, and the protocol used to connect
42 // to the TURN server in the case of TURN candidates.
43 kEnumCounterIceCandidatePairTypeUdp,
44 kEnumCounterIceCandidatePairTypeTcp,
45 kPeerConnectionEnumCounter_Max
pthatcher1 2015/08/19 02:47:53 One more underscore.
guoweis_webrtc 2015/08/19 18:25:52 Done.
46 };
47
35 // Currently this contains information related to WebRTC network/transport 48 // Currently this contains information related to WebRTC network/transport
36 // information. 49 // information.
37 50
38 // The difference between PeerConnectionMetricsCounter and 51 // The difference between PeerConnectionEnumCounter and
39 // PeerConnectionMetricsName is that the "Counter" is only counting the 52 // PeerConnectionMetricsName is that the "EnumCounter" is only counting the
40 // occurrences of events, while "Name" has a value associated with it which is 53 // occurrences of events, while "Name" has a value associated with it which is
41 // used to form a histogram. 54 // used to form a histogram.
42 55
43 // This enum is backed by Chromium's histograms.xml, 56 // This enum is backed by Chromium's histograms.xml,
44 // chromium/src/tools/metrics/histograms/histograms.xml 57 // chromium/src/tools/metrics/histograms/histograms.xml
45 // Existing values cannot be re-ordered and new enums must be added 58 // Existing values cannot be re-ordered and new enums must be added
46 // before kBoundary. 59 // before kBoundary.
47 enum PeerConnectionMetricsCounter { 60 enum PeerConnectionAddressFamilyCounter {
48 kPeerConnection_IPv4, 61 kPeerConnection_IPv4,
49 kPeerConnection_IPv6, 62 kPeerConnection_IPv6,
50 kBestConnections_IPv4, 63 kBestConnections_IPv4,
51 kBestConnections_IPv6, 64 kBestConnections_IPv6,
52 kPeerConnectionMetricsCounter_Max, 65 kPeerConnectionAddressFamilyCounter_Max,
53 }; 66 };
54 67
55 // TODO(guoweis): Keep previous name here until all references are renamed. 68 // TODO(guoweis): Keep previous name here until all references are renamed.
56 #define kBoundary kPeerConnectionMetricsCounter_Max 69 #define kBoundary kPeerConnectionAddressFamilyCounter_Max
57 70
58 // TODO(guoweis): Keep previous name here until all references are renamed. 71 // TODO(guoweis): Keep previous name here until all references are renamed.
59 typedef PeerConnectionMetricsCounter PeerConnectionUMAMetricsCounter; 72 typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter;
60 73
61 // This enum defines types for UMA samples, which will have a range. 74 // This enum defines types for UMA samples, which will have a range.
62 enum PeerConnectionMetricsName { 75 enum PeerConnectionMetricsName {
63 kNetworkInterfaces_IPv4, // Number of IPv4 interfaces. 76 kNetworkInterfaces_IPv4, // Number of IPv4 interfaces.
64 kNetworkInterfaces_IPv6, // Number of IPv6 interfaces. 77 kNetworkInterfaces_IPv6, // Number of IPv6 interfaces.
65 kTimeToConnect, // In milliseconds. 78 kTimeToConnect, // In milliseconds.
66 kLocalCandidates_IPv4, // Number of IPv4 local candidates. 79 kLocalCandidates_IPv4, // Number of IPv4 local candidates.
67 kLocalCandidates_IPv6, // Number of IPv6 local candidates. 80 kLocalCandidates_IPv6, // Number of IPv6 local candidates.
68 kAudioSrtpCipher, // Name of SRTP cipher used in audio channel. 81 kAudioSrtpCipher, // Name of SRTP cipher used in audio channel.
69 kAudioSslCipher, // Name of SSL cipher used in audio channel. 82 kAudioSslCipher, // Name of SSL cipher used in audio channel.
70 kVideoSrtpCipher, // Name of SRTP cipher used in video channel. 83 kVideoSrtpCipher, // Name of SRTP cipher used in video channel.
71 kVideoSslCipher, // Name of SSL cipher used in video channel. 84 kVideoSslCipher, // Name of SSL cipher used in video channel.
72 kDataSrtpCipher, // Name of SRTP cipher used in data channel. 85 kDataSrtpCipher, // Name of SRTP cipher used in data channel.
73 kDataSslCipher, // Name of SSL cipher used in data channel. 86 kDataSslCipher, // Name of SSL cipher used in data channel.
74 kPeerConnectionMetricsName_Max 87 kPeerConnectionMetricsName_Max
75 }; 88 };
76 89
77 // TODO(guoweis): Keep previous name here until all references are renamed. 90 // TODO(guoweis): Keep previous name here until all references are renamed.
78 typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName; 91 typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName;
79 92
93 // The IceCandidatePairType has the format of
94 // <local_candidate_type>_<remote_candidate_type>. It is recorded based on the
95 // type of candidate pair used when the PeerConnection first goes to a completed
96 // state. For bundle case, only the first transport gets recorded.
pthatcher1 2015/08/19 02:47:53 For bundle case => When BUNDLE is enabled
guoweis_webrtc 2015/08/19 18:25:52 Done.
97 enum IceCandidatePairType {
98 kIceCandidatePairHostHost,
99 kIceCandidatePairHostSrflx,
100 kIceCandidatePairHostRelay,
101 kIceCandidatePairHostPrflx,
102 kIceCandidatePairSrflxHost,
103 kIceCandidatePairSrflxSrflx,
104 kIceCandidatePairSrflxRelay,
105 kIceCandidatePairSrflxPrflx,
106 kIceCandidatePairRelayHost,
107 kIceCandidatePairRelaySrflx,
108 kIceCandidatePairRelayRelay,
109 kIceCandidatePairRelayPrflx,
110 kIceCandidatePairPrflxHost,
111 kIceCandidatePairPrflxSrflx,
112 kIceCandidatePairPrflxRelay,
113 kIceCandidatePairMax
114 };
115
80 } // namespace webrtc 116 } // namespace webrtc
81 117
82 #endif // TALK_APP_WEBRTC_UMA6METRICS_H_ 118 #endif // TALK_APP_WEBRTC_UMAMETRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698