OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2026 type = kEnumCounterIceCandidatePairTypeUdp; | 2026 type = kEnumCounterIceCandidatePairTypeUdp; |
2027 } else { | 2027 } else { |
2028 CHECK(0); | 2028 CHECK(0); |
2029 } | 2029 } |
2030 metrics_observer_->IncrementEnumCounter( | 2030 metrics_observer_->IncrementEnumCounter( |
2031 type, GetIceCandidatePairCounter(local, remote), | 2031 type, GetIceCandidatePairCounter(local, remote), |
2032 kIceCandidatePairMax); | 2032 kIceCandidatePairMax); |
2033 | 2033 |
2034 // Increment the counter for IP type. | 2034 // Increment the counter for IP type. |
2035 if (local.address().family() == AF_INET) { | 2035 if (local.address().family() == AF_INET) { |
2036 // TODO(guoweis): Remove this next line once IncrementEnumCounter | |
2037 // implemented for PeerConnectionMetrics. | |
2038 metrics_observer_->IncrementCounter(kBestConnections_IPv4); | |
2039 | |
2040 metrics_observer_->IncrementEnumCounter( | 2036 metrics_observer_->IncrementEnumCounter( |
2041 kEnumCounterAddressFamily, kBestConnections_IPv4, | 2037 kEnumCounterAddressFamily, kBestConnections_IPv4, |
2042 kPeerConnectionAddressFamilyCounter_Max); | 2038 kPeerConnectionAddressFamilyCounter_Max); |
2043 | 2039 |
2044 } else if (local.address().family() == AF_INET6) { | 2040 } else if (local.address().family() == AF_INET6) { |
2045 // TODO(guoweis): Remove this next line. | |
2046 metrics_observer_->IncrementCounter(kBestConnections_IPv6); | |
2047 | |
2048 metrics_observer_->IncrementEnumCounter( | 2041 metrics_observer_->IncrementEnumCounter( |
2049 kEnumCounterAddressFamily, kBestConnections_IPv6, | 2042 kEnumCounterAddressFamily, kBestConnections_IPv6, |
2050 kPeerConnectionAddressFamilyCounter_Max); | 2043 kPeerConnectionAddressFamilyCounter_Max); |
2051 } else { | 2044 } else { |
2052 CHECK(0); | 2045 CHECK(0); |
2053 } | 2046 } |
2054 | 2047 |
2055 return; | 2048 return; |
2056 } | 2049 } |
2057 } | 2050 } |
(...skipping 30 matching lines...) Expand all Loading... |
2088 | 2081 |
2089 if (!srtp_cipher.empty()) { | 2082 if (!srtp_cipher.empty()) { |
2090 metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher); | 2083 metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher); |
2091 } | 2084 } |
2092 if (!ssl_cipher.empty()) { | 2085 if (!ssl_cipher.empty()) { |
2093 metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher); | 2086 metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher); |
2094 } | 2087 } |
2095 } | 2088 } |
2096 | 2089 |
2097 } // namespace webrtc | 2090 } // namespace webrtc |
OLD | NEW |