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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/umametrics.h
diff --git a/talk/app/webrtc/umametrics.h b/talk/app/webrtc/umametrics.h
index bb9e05230d35cb0cb7dff3de24515625cd30a6f9..d822b6e6cd65271ddd66d077e257dce37132cfc2 100644
--- a/talk/app/webrtc/umametrics.h
+++ b/talk/app/webrtc/umametrics.h
@@ -32,11 +32,22 @@
namespace webrtc {
+// Used to specify which enum counter type we're incrementing in
+// MetricsObserverInterface::IncrementEnumCounter.
+enum PeerConnectionEnumCounterType {
+ kPeerConnectionEnumCounter_AddressFamily,
+ // 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.
+ // protocol used by the local candidate.
+ kPeerConnectionEnumCounter_IceCandidatePairTypeUdp,
+ kPeerConnectionEnumCounter_IceCandidatePairTypeTcp,
+ 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.
+};
+
// Currently this contains information related to WebRTC network/transport
// information.
-// The difference between PeerConnectionMetricsCounter and
-// PeerConnectionMetricsName is that the "Counter" is only counting the
+// The difference between PeerConnectionEnumCounter and
+// PeerConnectionMetricsName is that the "EnumCounter" is only counting the
// occurrences of events, while "Name" has a value associated with it which is
// used to form a histogram.
@@ -44,19 +55,19 @@ namespace webrtc {
// chromium/src/tools/metrics/histograms/histograms.xml
// Existing values cannot be re-ordered and new enums must be added
// before kBoundary.
-enum PeerConnectionMetricsCounter {
+enum PeerConnectionAddressFamilyCounter {
kPeerConnection_IPv4,
kPeerConnection_IPv6,
kBestConnections_IPv4,
kBestConnections_IPv6,
- kPeerConnectionMetricsCounter_Max,
+ kPeerConnectionAddressFamilyCounter_Max,
};
// TODO(guoweis): Keep previous name here until all references are renamed.
-#define kBoundary kPeerConnectionMetricsCounter_Max
+#define kBoundary kPeerConnectionAddressFamilyCounter_Max
// TODO(guoweis): Keep previous name here until all references are renamed.
-typedef PeerConnectionMetricsCounter PeerConnectionUMAMetricsCounter;
+typedef PeerConnectionAddressFamilyCounter PeerConnectionUMAMetricsCounter;
// This enum defines types for UMA samples, which will have a range.
enum PeerConnectionMetricsName {
@@ -77,6 +88,29 @@ enum PeerConnectionMetricsName {
// TODO(guoweis): Keep previous name here until all references are renamed.
typedef PeerConnectionMetricsName PeerConnectionUMAMetricsName;
+// The IceCandidatePairType has the format of
+// <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.
+// is recorded on the BestConnection when we have the first OnTransportCompleted
+// 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.
+enum IceCandidatePairType {
+ kIceCandidatePair_Host_Host,
+ kIceCandidatePair_Host_Srflx,
+ kIceCandidatePair_Host_Relay,
+ kIceCandidatePair_Host_Prflx,
+ kIceCandidatePair_Srflx_Host,
+ kIceCandidatePair_Srflx_Srflx,
+ kIceCandidatePair_Srflx_Relay,
+ kIceCandidatePair_Srflx_Prflx,
+ kIceCandidatePair_Relay_Host,
+ kIceCandidatePair_Relay_Srflx,
+ kIceCandidatePair_Relay_Relay,
+ kIceCandidatePair_Relay_Prflx,
+ kIceCandidatePair_Prflx_Host,
+ kIceCandidatePair_Prflx_Srflx,
+ 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.
+ kIceCandidatePair_Max
+};
+
} // namespace webrtc
#endif // TALK_APP_WEBRTC_UMA6METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698