History log of /frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
948a85948dcccea4aaa9d70a74405308581b0925 16-Mar-2017 Hugo Benichi <hugobenichi@google.com> Connectivity metrics: change how interface names are logged

This patch deprecates the ifname field for specific metrics events of
types DhcpClientEvent, DhcpErrorEvent, IpReachabilityEvent and
IpManagerEvent.

Instead ifnames are logged in ConnectivityMetricsEvent, allowing for
link layer inference.

Test: updated unit tests, $ runtest frameworks-net passes
Bug: 34901696
Change-Id: I8bfabcb115bbd5289471d653c153a40bb48f28cd
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
95cb226c1a4ff47531da65ef2617ade0dea5c9b8 11-Jan-2017 Hugo Benichi <hugobenichi@google.com> IP connectivity metrics: cleanup obsolete code

This patch cleans obsolete code related to IP connectivity metrics:
- remove @SystemApi on android.net.metrics: now that metrics events
are processed and serialized in the frameworks only, event classes
should not appear in the system apis.
- remove obsolete Logger classes: ConnectivityMetrics app was the
unique user of ConnectivityMetricsLogger until nyc-mr1. From nyc-mr1
the app started using dumpsys to get metrics for IpConnectivity and
Telephony, which made ConnectivityMetricsLogger obsolete.
- simplifications in MetricsTestUtil

Test: - runtest frameworks-net
- manually verified $ adb shell dumpsys connmetrics
Bug: 30054585
Bug: 32648597
Change-Id: I85ef65f7f69eb9299e4636cc7af54067201d9daf
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
0d1c65b221dee1ef80a03c25877e7fd58fc106de 22-Jun-2016 Hugo Benichi <hugobenichi@google.com> IpConn metrics: distinguish NUD_FAILED answers

This patch adds in IpReachabilityMonitor a timestamp variable set
everytime that probeAll() send NUD probe requests to RTNETLINK.
This allows to distinguish between:
1) NUD_FAILED events resulting from such a forced NUD probe
2) "organic" NUD_FAILED notifications from the kernel

This distinction is added to IpReachabilityEvent as a one-bit flag.

This patch also changes the formatting of ApfProgramEvent flags to use
'|' as a joining character, similarly to other flags formatting.

Bug: 21859053
Change-Id: I24c64a3f17fa283eace5bd0a05c21a90a2305359
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
cfddd6879283860bb4d2cf2972ea086f585a37ec 31-May-2016 Hugo Benichi <hugobenichi@google.com> Refactor IP connectivity event logging

This patch removes static methods for logging IP connectivity events
defined in android.net.metrics and replaces them with a single log()
instance method defined on IpConnectivityLog. Event constructors are
now public also. Every classes logging such events now create an
instance of IpConnectivityLog for logging event objects directly
instantiated with new.

Removing static dependencies allow straightforward testing of logging.

This patch also removes the base IpConnectivityEvent class which is not
needed any more.

Bug: 29035129
Change-Id: I3de700f93f46deaa48a759f938f7d00e1d8bff98
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
61cbccc2bf7983b50e7a7f1fdb1858caeab6fd96 26-Apr-2016 Hugo Benichi <hugobenichi@google.com> Remove unused event tags of IpConnectivityEvent

Bug: 28204408
Change-Id: I8de95add30cdf5c35c8129ee1b95d2d648b3316d
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
5df9d729f6c78215f287701d7e136dfc922e2bd3 25-Apr-2016 Hugo Benichi <hugobenichi@google.com> Better ConnectivityMetricsEvent printing

This patch adds more information printing for IpConnectivity event
classes in android.net.metrics.

example:

ConnectivityMetricsEvent(14:36:35.799, 0, 1026): DhcpClientEvent(wlan0, DhcpRequestingState)
ConnectivityMetricsEvent(14:36:35.805, 0, 1026): DhcpClientEvent(wlan0, DhcpHaveAddressState)
ConnectivityMetricsEvent(14:36:35.809, 0, 4096): IpManagerEvent(wlan0, PROVISIONING_OK, 155ms)
ConnectivityMetricsEvent(14:36:35.810, 0, 1026): DhcpClientEvent(wlan0, DhcpBoundState)
ConnectivityMetricsEvent(14:36:35.871, 0, 2048): NetworkEvent(101, NETWORK_CONNECTED, 0ms)
ConnectivityMetricsEvent(14:36:35.874, 0, 2051): ValidationProbeEvent(101, PROBE_HTTP:599, 3ms)
ConnectivityMetricsEvent(14:36:35.874, 0, 2048): NetworkEvent(101, NETWORK_VALIDATION_FAILED, 0ms)
ConnectivityMetricsEvent(14:36:35.928, 0, 3072): DefaultNetworkEvent(0 -> 101, [WIFI], IPv4: false, IPv6: false)
ConnectivityMetricsEvent(14:36:37.008, 0, 2051): ValidationProbeEvent(101, PROBE_HTTP:204, 134ms)
ConnectivityMetricsEvent(14:36:37.008, 0, 2050): NetworkEvent(101, NETWORK_VALIDATED, 1137ms)

Also fixes a couple of event logging issues:
- do no record spurious receive DhcpErrorEvent when a network goes down.
- add an eventType field to IpManagerEvent instead of using the
loggger component tag.

Bug: 28204408
Change-Id: Ia6f4ccfd7a0c63a5ccec18825f226c0b5781217b
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java
25bf8f5d5678e747933ae9e4051daa99ddfcfaa3 19-Apr-2016 Hugo Benichi <hugobenichi@google.com> Various fixes in IpReachability event logging

- fold IpReachabilityMonitor* classes into a single IpReachabilityEvent.
- only log an event for NUD_FAILED Netlink answers.
- distinguish between NUD_FAILED with or without lost of provisioning.
- do not record host ip addresses.
- record interface name instead of interface index when losing
provisioning.

- also return an error code when probeNeighbor fails, and log this error
code in IpReachability events.

Bug: 28204408
Change-Id: I5f0def0ab1ace7e467a0c69b3b82d07ef2252307
/frameworks/base/core/java/android/net/metrics/IpReachabilityEvent.java