diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-04-29 14:58:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-29 14:58:51 +0000 |
commit | 32a6121bd4891812d34d0a961b0f141174c564fc (patch) | |
tree | 00df7fc70ff1f8ce5ef9adadfb269679de89bafe | |
parent | 28e8bf0213017f49f95e3d61f0bd4d3fd715d08e (diff) | |
parent | 11f1b3d49fc0c96e73eae0c993edda46228bba13 (diff) |
Merge "Remove WPS metrics" into rvc-dev am: 11f1b3d49f
Change-Id: I44d671d8d7c686ea182b56cbd51ed4e7e8314117
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 93 | ||||
-rw-r--r-- | service/proto/src/metrics.proto | 33 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java | 45 |
3 files changed, 3 insertions, 168 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index 883203d2c..4c0627af6 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -90,7 +90,6 @@ import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiNetworkSuggestion import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiToggleStats; import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats; import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStatsEntry; -import com.android.server.wifi.proto.nano.WifiMetricsProto.WpsMetrics; import com.android.server.wifi.rtt.RttMetrics; import com.android.server.wifi.scanner.KnownBandsChannelHelper; import com.android.server.wifi.util.ExternalCallbackTracker; @@ -197,7 +196,6 @@ public class WifiMetrics { private RttMetrics mRttMetrics; private final PnoScanMetrics mPnoScanMetrics = new PnoScanMetrics(); private final WifiLinkLayerUsageStats mWifiLinkLayerUsageStats = new WifiLinkLayerUsageStats(); - private final WpsMetrics mWpsMetrics = new WpsMetrics(); private final ExperimentValues mExperimentValues = new ExperimentValues(); private Handler mHandler; private ScoringParams mScoringParams; @@ -1328,78 +1326,6 @@ public class WifiMetrics { } } - /** - * Increment total number of wps connection attempts - */ - public void incrementWpsAttemptCount() { - synchronized (mLock) { - mWpsMetrics.numWpsAttempts++; - } - } - - /** - * Increment total number of wps connection success - */ - public void incrementWpsSuccessCount() { - synchronized (mLock) { - mWpsMetrics.numWpsSuccess++; - } - } - - /** - * Increment total number of wps failure on start - */ - public void incrementWpsStartFailureCount() { - synchronized (mLock) { - mWpsMetrics.numWpsStartFailure++; - } - } - - /** - * Increment total number of wps overlap failure - */ - public void incrementWpsOverlapFailureCount() { - synchronized (mLock) { - mWpsMetrics.numWpsOverlapFailure++; - } - } - - /** - * Increment total number of wps timeout failure - */ - public void incrementWpsTimeoutFailureCount() { - synchronized (mLock) { - mWpsMetrics.numWpsTimeoutFailure++; - } - } - - /** - * Increment total number of other wps failure during connection - */ - public void incrementWpsOtherConnectionFailureCount() { - synchronized (mLock) { - mWpsMetrics.numWpsOtherConnectionFailure++; - } - } - - /** - * Increment total number of supplicant failure after wps - */ - public void incrementWpsSupplicantFailureCount() { - synchronized (mLock) { - mWpsMetrics.numWpsSupplicantFailure++; - } - } - - /** - * Increment total number of wps cancellation - */ - public void incrementWpsCancellationCount() { - synchronized (mLock) { - mWpsMetrics.numWpsCancellation++; - } - } - // Values used for indexing SystemStateEntries private static final int SCREEN_ON = 1; private static final int SCREEN_OFF = 0; @@ -3553,23 +3479,6 @@ public class WifiMetrics { pw.println(eventLine.toString()); } - pw.println("mWpsMetrics.numWpsAttempts=" - + mWpsMetrics.numWpsAttempts); - pw.println("mWpsMetrics.numWpsSuccess=" - + mWpsMetrics.numWpsSuccess); - pw.println("mWpsMetrics.numWpsStartFailure=" - + mWpsMetrics.numWpsStartFailure); - pw.println("mWpsMetrics.numWpsOverlapFailure=" - + mWpsMetrics.numWpsOverlapFailure); - pw.println("mWpsMetrics.numWpsTimeoutFailure=" - + mWpsMetrics.numWpsTimeoutFailure); - pw.println("mWpsMetrics.numWpsOtherConnectionFailure=" - + mWpsMetrics.numWpsOtherConnectionFailure); - pw.println("mWpsMetrics.numWpsSupplicantFailure=" - + mWpsMetrics.numWpsSupplicantFailure); - pw.println("mWpsMetrics.numWpsCancellation=" - + mWpsMetrics.numWpsCancellation); - mWifiPowerMetrics.dump(pw); mWifiWakeMetrics.dump(pw); @@ -4190,7 +4099,6 @@ public class WifiMetrics { mWifiLogProto.softApConnectedClientsEventsLocalOnly); } - mWifiLogProto.wpsMetrics = mWpsMetrics; mWifiLogProto.wifiPowerStats = mWifiPowerMetrics.buildProto(); mWifiLogProto.wifiRadioUsage = mWifiPowerMetrics.buildWifiRadioUsageProto(); mWifiLogProto.wifiWakeStats = mWifiWakeMetrics.buildProto(); @@ -4511,7 +4419,6 @@ public class WifiMetrics { mObservedHotspotR3ApsPerEssInScanHistogram.clear(); mSoftApEventListTethered.clear(); mSoftApEventListLocalOnly.clear(); - mWpsMetrics.clear(); mWifiWakeMetrics.clear(); mObserved80211mcApInScanHistogram.clear(); mWifiIsUnusableList.clear(); diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto index 2a8455235..d2e769d8c 100644 --- a/service/proto/src/metrics.proto +++ b/service/proto/src/metrics.proto @@ -372,8 +372,9 @@ message WifiLog { // SoftAP event list tracking sessions and client counts in local only mode repeated SoftApConnectedClientsEvent soft_ap_connected_clients_events_local_only = 90; - // Wps connection metrics - optional WpsMetrics wps_metrics = 91; + // WPS connection metrics - removed + reserved 91; + reserved "wps_metrics"; // Wifi power statistics optional WifiPowerStats wifi_power_stats = 92; @@ -1799,34 +1800,6 @@ message SoftApConnectedClientsEvent { optional bool client_control_is_enabled = 10; } -// Wps connection metrics -// Keeps track of Wi-Fi Protected Setup usage -message WpsMetrics { - // Total number of wps connection attempts - optional int32 num_wps_attempts = 1; - - // Total number of wps connection successes - optional int32 num_wps_success = 2; - - // Total number of wps failures on start - optional int32 num_wps_start_failure = 3; - - // Total number of wps overlap failure - optional int32 num_wps_overlap_failure = 4; - - // Total number of wps timeout failure - optional int32 num_wps_timeout_failure = 5; - - // Total number of other wps failure during connection - optional int32 num_wps_other_connection_failure = 6; - - // Total number of supplicant failure after wps - optional int32 num_wps_supplicant_failure = 7; - - // Total number of wps cancellation - optional int32 num_wps_cancellation = 8; -} - // Power stats for Wifi message WifiPowerStats { diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java index 0b9885c93..d374dc9ce 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java @@ -108,7 +108,6 @@ import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent; import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiRadioUsage; import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats; import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStatsEntry; -import com.android.server.wifi.proto.nano.WifiMetricsProto.WpsMetrics; import com.android.server.wifi.rtt.RttMetrics; import com.android.server.wifi.util.ExternalCallbackTracker; import com.android.server.wifi.util.InformationElementUtil; @@ -421,14 +420,6 @@ public class WifiMetricsTest extends WifiBaseTest { private static final int NUM_PNO_SCAN_ATTEMPTS = 20; private static final int NUM_PNO_SCAN_FAILED = 5; private static final int NUM_PNO_FOUND_NETWORK_EVENTS = 10; - private static final int NUM_WPS_ATTEMPTS = 17; - private static final int NUM_WPS_SUCCESS = 21; - private static final int NUM_WPS_START_FAILURE = 7; - private static final int NUM_WPS_OVERLAP_FAILURE = 3; - private static final int NUM_WPS_TIMEOUT_FAILURE = 8; - private static final int NUM_WPS_OTHER_CONNECTION_FAILURE = 16; - private static final int NUM_WPS_SUPPLICANT_FAILURE = 12; - private static final int NUM_WPS_CANCELLATION = 11; private static final int NUM_RADIO_MODE_CHANGE_TO_MCC = 4; private static final int NUM_RADIO_MODE_CHANGE_TO_SCC = 13; private static final int NUM_RADIO_MODE_CHANGE_TO_SBS = 19; @@ -947,31 +938,6 @@ public class WifiMetricsTest extends WifiBaseTest { addSoftApEventsToMetrics(); - // increment wps metrics - for (int i = 0; i < NUM_WPS_ATTEMPTS; i++) { - mWifiMetrics.incrementWpsAttemptCount(); - } - for (int i = 0; i < NUM_WPS_SUCCESS; i++) { - mWifiMetrics.incrementWpsSuccessCount(); - } - for (int i = 0; i < NUM_WPS_START_FAILURE; i++) { - mWifiMetrics.incrementWpsStartFailureCount(); - } - for (int i = 0; i < NUM_WPS_OVERLAP_FAILURE; i++) { - mWifiMetrics.incrementWpsOverlapFailureCount(); - } - for (int i = 0; i < NUM_WPS_TIMEOUT_FAILURE; i++) { - mWifiMetrics.incrementWpsTimeoutFailureCount(); - } - for (int i = 0; i < NUM_WPS_OTHER_CONNECTION_FAILURE; i++) { - mWifiMetrics.incrementWpsOtherConnectionFailureCount(); - } - for (int i = 0; i < NUM_WPS_SUPPLICANT_FAILURE; i++) { - mWifiMetrics.incrementWpsSupplicantFailureCount(); - } - for (int i = 0; i < NUM_WPS_CANCELLATION; i++) { - mWifiMetrics.incrementWpsCancellationCount(); - } for (int i = 0; i < NUM_ONESHOT_SCAN_REQUESTS_WITH_DFS_CHANNELS; i++) { mWifiMetrics.incrementOneshotScanWithDfsCount(); } @@ -1397,17 +1363,6 @@ public class WifiMetricsTest extends WifiBaseTest { verifySoftApEventsStoredInProto(); - WpsMetrics wps_metrics = mDecodedProto.wpsMetrics; - assertNotNull(wps_metrics); - assertEquals(NUM_WPS_ATTEMPTS, wps_metrics.numWpsAttempts); - assertEquals(NUM_WPS_SUCCESS, wps_metrics.numWpsSuccess); - assertEquals(NUM_WPS_START_FAILURE, wps_metrics.numWpsStartFailure); - assertEquals(NUM_WPS_OVERLAP_FAILURE, wps_metrics.numWpsOverlapFailure); - assertEquals(NUM_WPS_TIMEOUT_FAILURE, wps_metrics.numWpsTimeoutFailure); - assertEquals(NUM_WPS_OTHER_CONNECTION_FAILURE, wps_metrics.numWpsOtherConnectionFailure); - assertEquals(NUM_WPS_SUPPLICANT_FAILURE, wps_metrics.numWpsSupplicantFailure); - assertEquals(NUM_WPS_CANCELLATION, wps_metrics.numWpsCancellation); - assertEquals(NUM_WATCHDOG_SUCCESS_DURATION_MS, mDecodedProto.watchdogTriggerToConnectionSuccessDurationMs); assertEquals(IS_MAC_RANDOMIZATION_ON, mDecodedProto.isMacRandomizationOn); |