diff options
author | xshu <xshu@google.com> | 2020-01-09 15:01:00 -0800 |
---|---|---|
committer | xshu <xshu@google.com> | 2020-01-09 15:31:59 -0800 |
commit | 229a8457010009e748408d85773479edae01da9c (patch) | |
tree | 2caafd169b469a5153cc9c80434a92240f427b31 /service | |
parent | 6632bbc1fb548fa613fdeaef3bf18ae08a8e8a47 (diff) |
Metrics: number of IP renewal failures
Counts the number of times IP provisioning failure occurs in
ConnectedState.
Bug: 147448863
Test: atest FrameworksWifiTests
Change-Id: I4274bba5a82036d1b61affbfd027bba9371955aa
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 4 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 11 | ||||
-rw-r--r-- | service/proto/src/metrics.proto | 3 |
3 files changed, 18 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 8957f21fe..4f7fcf0ef 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -5158,6 +5158,10 @@ public class ClientModeImpl extends StateMachine { break; } break; + case CMD_IP_CONFIGURATION_LOST: + mWifiMetrics.incrementIpRenewalFailure(); + handleStatus = NOT_HANDLED; + break; default: handleStatus = NOT_HANDLED; break; diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index 1a0a13d35..f93a5cc9d 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -2853,6 +2853,8 @@ public class WifiMetrics { pw.println("mWifiLogProto.rxLinkSpeedCount5gLow=" + mRxLinkSpeedCount5gLow); pw.println("mWifiLogProto.rxLinkSpeedCount5gMid=" + mRxLinkSpeedCount5gMid); pw.println("mWifiLogProto.rxLinkSpeedCount5gHigh=" + mRxLinkSpeedCount5gHigh); + pw.println("mWifiLogProto.numIpRenewalFailure=" + + mWifiLogProto.numIpRenewalFailure); } } } @@ -5112,6 +5114,15 @@ public class WifiMetrics { } /** + * Increment number of IP renewal failures. + */ + public void incrementIpRenewalFailure() { + synchronized (mLock) { + mWifiLogProto.numIpRenewalFailure++; + } + } + + /** * Sets the duration for evaluating Wifi condition to trigger a data stall */ public void setDataStallDurationMs(int duration) { diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto index aa0b38e22..60dd432c4 100644 --- a/service/proto/src/metrics.proto +++ b/service/proto/src/metrics.proto @@ -573,6 +573,9 @@ message WifiLog { // Histogram of Rx link speed at 5G high band repeated Int32Count rx_link_speed_count_5g_high = 156; + + // Count of IP renewal failures. + optional int32 num_ip_renewal_failure = 157; } // Information that gets logged for every WiFi connection. |