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

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 kPeerConnectionEnumCounter_AddressFamily,
39 // For next 2 counters, we track them separately based on the first hop
pthatcher1 2015/08/18 18:06:22 next 2 => the next 2
pthatcher1 2015/08/18 18:06:22 What do you mean by "first hop". I think you mean
guoweis_webrtc 2015/08/18 22:33:57 Done.
40 // protocol used by the local candidate.
41 kPeerConnectionEnumCounter_IceCandidatePairTypeUdp,
42 kPeerConnectionEnumCounter_IceCandidatePairTypeTcp,
43 kPeerConnectionEnumCounter_Max
pthatcher1 2015/08/18 18:06:22 I'd prefer names without the underscores.
guoweis_webrtc 2015/08/18 22:33:57 Done.
44 };
45
35 // Currently this contains information related to WebRTC network/transport 46 // Currently this contains information related to WebRTC network/transport
36 // information. 47 // information.
37 48
38 // The difference between PeerConnectionMetricsCounter and 49 // The difference between PeerConnectionEnumCounter and
39 // PeerConnectionMetricsName is that the "Counter" is only counting the 50 // PeerConnectionMetricsName is that the "EnumCounter" is only counting the
40 // occurrences of events, while "Name" has a value associated with it which is 51 // occurrences of events, while "Name" has a value associated with it which is
41 // used to form a histogram. 52 // used to form a histogram.
42 53
43 // This enum is backed by Chromium's histograms.xml, 54 // This enum is backed by Chromium's histograms.xml,
44 // chromium/src/tools/metrics/histograms/histograms.xml 55 // chromium/src/tools/metrics/histograms/histograms.xml
45 // Existing values cannot be re-ordered and new enums must be added 56 // Existing values cannot be re-ordered and new enums must be added
46 // before kBoundary. 57 // before kBoundary.
47 enum PeerConnectionMetricsCounter { 58 enum PeerConnectionAddressFamilyCounter {
48 kPeerConnection_IPv4, 59 kPeerConnection_IPv4,
49 kPeerConnection_IPv6, 60 kPeerConnection_IPv6,
50 kBestConnections_IPv4, 61 kBestConnections_IPv4,
51 kBestConnections_IPv6, 62 kBestConnections_IPv6,
52 kPeerConnectionMetricsCounter_Max, 63 kPeerConnectionAddressFamilyCounter_Max,
53 }; 64 };
54 65
55 // TODO(guoweis): Keep previous name here until all references are renamed. 66 // TODO(guoweis): Keep previous name here until all references are renamed.
56 #define kBoundary kPeerConnectionMetricsCounter_Max 67 #define kBoundary kPeerConnectionAddressFamilyCounter_Max
57 68
58 // TODO(guoweis): Keep previous name here until all references are renamed. 69 // TODO(guoweis): Keep previous name here until all references are renamed.
59 typedef PeerConnectionMetricsCounter PeerConnectionUMAMetricsCounter; 70 typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter;
60 71
61 // This enum defines types for UMA samples, which will have a range. 72 // This enum defines types for UMA samples, which will have a range.
62 enum PeerConnectionMetricsName { 73 enum PeerConnectionMetricsName {
63 kNetworkInterfaces_IPv4, // Number of IPv4 interfaces. 74 kNetworkInterfaces_IPv4, // Number of IPv4 interfaces.
64 kNetworkInterfaces_IPv6, // Number of IPv6 interfaces. 75 kNetworkInterfaces_IPv6, // Number of IPv6 interfaces.
65 kTimeToConnect, // In milliseconds. 76 kTimeToConnect, // In milliseconds.
66 kLocalCandidates_IPv4, // Number of IPv4 local candidates. 77 kLocalCandidates_IPv4, // Number of IPv4 local candidates.
67 kLocalCandidates_IPv6, // Number of IPv6 local candidates. 78 kLocalCandidates_IPv6, // Number of IPv6 local candidates.
68 kAudioSrtpCipher, // Name of SRTP cipher used in audio channel. 79 kAudioSrtpCipher, // Name of SRTP cipher used in audio channel.
69 kAudioSslCipher, // Name of SSL cipher used in audio channel. 80 kAudioSslCipher, // Name of SSL cipher used in audio channel.
70 kVideoSrtpCipher, // Name of SRTP cipher used in video channel. 81 kVideoSrtpCipher, // Name of SRTP cipher used in video channel.
71 kVideoSslCipher, // Name of SSL cipher used in video channel. 82 kVideoSslCipher, // Name of SSL cipher used in video channel.
72 kDataSrtpCipher, // Name of SRTP cipher used in data channel. 83 kDataSrtpCipher, // Name of SRTP cipher used in data channel.
73 kDataSslCipher, // Name of SSL cipher used in data channel. 84 kDataSslCipher, // Name of SSL cipher used in data channel.
74 kPeerConnectionMetricsName_Max 85 kPeerConnectionMetricsName_Max
75 }; 86 };
76 87
77 // TODO(guoweis): Keep previous name here until all references are renamed. 88 // TODO(guoweis): Keep previous name here until all references are renamed.
78 typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName; 89 typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName;
79 90
91 // The IceCandidatePairType has the format of
92 // <local_endpoint>_<remote_endpoint>. It
pthatcher1 2015/08/18 18:06:22 I think you mean <local_candidate_type>_<remote_ca
guoweis_webrtc 2015/08/18 22:33:57 Done.
93 // is recorded on the BestConnection when we have the first OnTransportCompleted
94 // signaled.
pthatcher1 2015/08/18 18:06:22 Might be more clear as "is recorded based on the t
guoweis_webrtc 2015/08/18 22:33:57 Done.
95 enum IceCandidatePairType {
96 kIceCandidatePair_Host_Host,
97 kIceCandidatePair_Host_Srflx,
98 kIceCandidatePair_Host_Relay,
99 kIceCandidatePair_Host_Prflx,
100 kIceCandidatePair_Srflx_Host,
101 kIceCandidatePair_Srflx_Srflx,
102 kIceCandidatePair_Srflx_Relay,
103 kIceCandidatePair_Srflx_Prflx,
104 kIceCandidatePair_Relay_Host,
105 kIceCandidatePair_Relay_Srflx,
106 kIceCandidatePair_Relay_Relay,
107 kIceCandidatePair_Relay_Prflx,
108 kIceCandidatePair_Prflx_Host,
109 kIceCandidatePair_Prflx_Srflx,
110 kIceCandidatePair_Prflx_Relay,
pthatcher1 2015/08/18 18:06:22 I'm not a fan of underscores here either.
guoweis_webrtc 2015/08/18 22:33:57 Done.
111 kIceCandidatePair_Max
112 };
113
80 } // namespace webrtc 114 } // namespace webrtc
81 115
82 #endif // TALK_APP_WEBRTC_UMA6METRICS_H_ 116 #endif // TALK_APP_WEBRTC_UMA6METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698