diff options
author | Roshan Pius <rpius@google.com> | 2018-03-14 16:18:34 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2018-03-29 12:04:28 -0700 |
commit | 65a9143d6c93624837da3867f1cadf2daab62236 (patch) | |
tree | fbdabae0f71f388fb649c50d0fe58e931c9bb70c /service | |
parent | c4002658545b95d0f7f1686e925072518416a78e (diff) |
WifiMetrics: Add new metrics for supplicant/hostapd crashes
Also, added a metric for wifi on failure due to supplicant.
Bug: 71720421
Test: Unit tests
Change-Id: I69f5b3a3ce2acf9b0915147b763074ab49c0fe79
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index 99cbdb0c3..404888ce8 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -1333,8 +1333,7 @@ public class WifiMetrics { */ public void incrementNumSupplicantCrashes() { synchronized (mLock) { - // TODO(b/71720421): Add metrics for supplicant crashes. - mWifiLogProto.numHalCrashes++; + mWifiLogProto.numSupplicantCrashes++; } } @@ -1343,8 +1342,7 @@ public class WifiMetrics { */ public void incrementNumHostapdCrashes() { synchronized (mLock) { - // TODO(b/71720421): Add metrics for hostapd crashes. - mWifiLogProto.numHalCrashes++; + mWifiLogProto.numHostapdCrashes++; } } @@ -1367,12 +1365,11 @@ public class WifiMetrics { } /** - * Increment number of times the wifi on failed due to an error in wificond. + * Increment number of times the wifi on failed due to an error in supplicant. */ public void incrementNumWifiOnFailureDueToSupplicant() { synchronized (mLock) { - // TODO(b/71720421): Add metrics for supplicant failure during startup. - mWifiLogProto.numWifiOnFailureDueToHal++; + mWifiLogProto.numWifiOnFailureDueToSupplicant++; } } @@ -1797,10 +1794,16 @@ public class WifiMetrics { + mWifiLogProto.numHalCrashes); pw.println("mWifiLogProto.numWificondCrashes=" + mWifiLogProto.numWificondCrashes); + pw.println("mWifiLogProto.numSupplicantCrashes=" + + mWifiLogProto.numSupplicantCrashes); + pw.println("mWifiLogProto.numHostapdCrashes=" + + mWifiLogProto.numHostapdCrashes); pw.println("mWifiLogProto.numWifiOnFailureDueToHal=" + mWifiLogProto.numWifiOnFailureDueToHal); pw.println("mWifiLogProto.numWifiOnFailureDueToWificond=" + mWifiLogProto.numWifiOnFailureDueToWificond); + pw.println("mWifiLogProto.numWifiOnFailureDueToSupplicant=" + + mWifiLogProto.numWifiOnFailureDueToSupplicant); pw.println("StaEventList:"); for (StaEventWithTime event : mStaEventList) { pw.println(event); |