android_packages_modules_Co.../tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Junyu Lai c00cf63e8a Add metrics for requests satisfied by local networks
This change introduces `SatisfiedByLocalNetworkMetrics` to count the
number of `NetworkRequest`s per UID that can be satisfied by a
local-only network.

The purpose is to gather data on how many applications register callbacks
that would match non-thread local network connectivity.
This data helps in understanding app behavior and can inform
future development of local-only network features particularly
for the backward compatibility of existing NetworkRequests.

- A new class `SatisfiedByLocalNetworkMetrics` handles the counting and
  logging logic.
- `ConnectivityService` calls into this class upon `NetworkRequest`
  registration.
- Counts are logged to statsd.

Sample dumpsys output:
  SatisfiedByLocalNetworkMetrics: {LISTEN={10217=2}}

Bug: 406172997
Flag: EXEMPT controlled by the `satisfied_by_local_network_metrics`
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSSatisfiedByLocalNetworkMetricsTest \
      ConnectivityCoverageTests:android.net.connectivity.com.android.metrics.SatisfiedByLocalNetworkMetricsTest \
      --update-device
Test: m statsd_testdrive && statsd_testdrive -e 10247
Test: Manual: atest dumpsys connectivity

Change-Id: I62f6299a1c726537b373e3e80d41a494323f3cf2
2025-07-01 16:01:28 +08:00
..
benchmark Add kill switch for storing transport types 2025-06-10 17:57:11 +08:00
common Merge "Skip tests if FLAG_AVOID_BAD_WIFI_FROM_CARRIER_CONFIG is not enabled" into main 2025-06-24 22:30:31 -07:00
cts Merge "Wait for Soft AP completion before connecting" into main 2025-06-23 20:28:03 -07:00
deflake Remove dependencies on the 1-variant fallback 2024-10-22 16:31:00 -07:00
integration Merge "Clean eventuallyExpect invocations" into main 2025-05-28 15:09:28 -07:00
native Remove unused libprocessgroup dependency 2025-01-17 11:20:39 -08:00
smoketest [DON'T BLOCK] Test ownership migration rules 2024-01-31 14:10:00 +00:00
unit Add metrics for requests satisfied by local networks 2025-07-01 16:01:28 +08:00