History log of /frameworks/base/core/java/android/net/metrics/DnsEvent.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c867f787bc7b6ecd49fe3a9c638b34befc3922ec 07-Nov-2017 Hugo Benichi <hugobenichi@google.com> Networking metrics: minor pretty printing improvements

Bug: 65700460
Test: manually verified the output of $ adb shell dumpsys connmetrics
Change-Id: Ieae535b48d2e2b6e9087431d345c8f916006bb6c
/frameworks/base/core/java/android/net/metrics/DnsEvent.java
ab20975c7485a0451d77e19d48ab8fe09e483927 27-Sep-2017 Hugo Benichi <hugobenichi@google.com> NetdEventListener: add rolling log of connect and dns stats

This patch adds a rolling time order logs of basic statistics of
connect and dns, grouped by network id and including:
- average error rate
- average latency
- max latency
- total number of operations

The log is segmented in buckets of 5 minutes, and covers the last 4
hours.

Note that only blocking connect() calls latencies are recorded with the
current netd logging infrastructure.

Example of logs:
05:30:00.000: {netId=100, WIFI, dns avg=92ms max=525ms err=00.0% tot=37, connect avg=0ms max=23ms err=00.0% tot=25}
05:35:00.000: {netId=100, WIFI, dns avg=94ms max=537ms err=05.3% tot=57, connect avg=0ms max=0ms err=00.0% tot=69}
05:40:00.000: {netId=100, WIFI, dns avg=220ms max=350ms err=00.0% tot=4, connect avg=0ms max=0ms err=00.0% tot=2}
05:45:00.000: {netId=100, WIFI, dns avg=112ms max=113ms err=00.0% tot=1, connect avg=0ms max=0ms err=00.0% tot=1}
05:50:00.000: {netId=100, WIFI, dns avg=131ms max=269ms err=00.0% tot=2, connect avg=0ms max=0ms err=00.0% tot=1}

Bug: 65700460
Test: runtest frameworks-net
Change-Id: I54e76d18fbaaa92639fb675f93ea90b7615fd6bf
/frameworks/base/core/java/android/net/metrics/DnsEvent.java
5eb9053c4e8c788b83cfcfd7bfd39f628dd4ca45 23-Mar-2017 Hugo Benichi <hugobenichi@google.com> Connectivity metrics: add transports to connect stats

This patch groups connect() events per netId. It adds netid and
transport information to serialized ConnectStatistics events.

Test: updated NetdEventListenerServiceTest
updated IpConnectivityMetricsTest
$ runtest frameworks-net passes
Bug: 34901696
Change-Id: Id0d536ff723ded5c26eafe0bb138ba75ba2856c5
Merged-In: I4769496383943e714a1d350c298e093c2ed57477

(cherry picked from commit dfc2cc5857199345e08f07977b79b20292f964a2)
/frameworks/base/core/java/android/net/metrics/DnsEvent.java
2a5cfb9738867da634a3bf64ccef881aaefbfce5 22-Mar-2017 Hugo Benichi <hugobenichi@google.com> Connectivity metrics: log DnsEvents in-band

This patch changes how DnsEvents are logged in IpConnectivityMetrics.
The following changes are made:
- DnsEventBatch are not logged after 100 queries on the same network
- this allows to merge DnsEvent and DnsEventBatch into one class
- DnsEventBatch are not logged after a network disconnect
- this allows to remove the NetworkCallback
- DnsEvent are now logged similarly to ConnectStats when statistics are
flushed, in a direct call from IpConnectivityMetrics into
NetdEventListenerService, in a direct call from IpConnectivityMetrics
into NetdEventListenerService.
- this allows to remove the Parcelable implementation of DnsEvent
- transports information is added to DnsEvent.

Test: - simplified NetdEventListenerServiceTest covering dns logging
- updated IpConnectivityEventBuilderTest
- updated IpConnectivityMetricsTest
- $ runtest frameworks-net passes
- manually verified $ adb shell dumpsys connmetrics list proto
Bug: 34901696
Change-Id: I4fcd0ad7a7b85d587647f471a90c1e53a18fc95a
Merged-In: Ia4b33fd4212741152662a2adbb0533bd1b4902ee

(cherry picked from commit 0699cf98042a64e41ee076c464eb115a6579be08)
/frameworks/base/core/java/android/net/metrics/DnsEvent.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/DnsEvent.java
a2d5860a5f9e791e88a61d8d983868998cd52cd8 21-Sep-2016 Michal Karpinski <mkarpinski@google.com> Rename DnsEventListenerServiceTest to NetdEventListenerServiceTest

Change-Id: I67e645306444938a4675e91a9db5d716c0bd4881
(cherry picked from commit d82fccd368ca605c8efc21b198e667fd30c4182e)
/frameworks/base/core/java/android/net/metrics/DnsEvent.java
cf6b12f50aa3251a3fc9929c565f8a19eaaac49e 04-Jul-2016 Hugo Benichi <hugobenichi@google.com> IpConn metrics: use @IntDef

Change-Id: Iae23f04abd3d1a43e7217f4fd641cd5fa61a7a1b
/frameworks/base/core/java/android/net/metrics/DnsEvent.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/DnsEvent.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/DnsEvent.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/DnsEvent.java
4b6dfc2ef54723768a67887ce2a42d4f8f64d0f4 14-Apr-2016 Hugo Benichi <hugobenichi@google.com> Make android.net.metrics Event classes @SystemApi

Bug: 28204408
Change-Id: I8ffe833213bbc03a7f70c51789f4899ee08f6e08
/frameworks/base/core/java/android/net/metrics/DnsEvent.java
627b42494d82eca4fd51abfc0a5d7f330862b881 15-Apr-2016 Hugo Benichi <hugobenichi@google.com> Fixes fatal linter errors in android.net.metrics

This patch changes how Event classes are organized:
- Base IpConnectivityEvent class does not implement Parcelable because
it cannot be final (has children). It also becomes abstract because
it is not supposed to be instantiated and logged directly.
- All children classes becomes final because they are Parcelable.
- All constructors of all children classes become private, because they
are supposed to be instantiated with their associated logEvent()
methods.
- All instance fields of all children classes become public final.
Rational: if private, the ConnectivityMetrics app cannot read
their data.

Bug: 28204408
Change-Id: I1a4689c422230c6ed034307dec54a61daf8a6598
/frameworks/base/core/java/android/net/metrics/DnsEvent.java
43724734d76c900fba9a004e28ff0ea4bd9d07ec 12-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Metrics logging for DNS queries.

Bug: 28204408
Change-Id: I05fc9b580aa20d99e8766057e17a38b5eb6267e8
/frameworks/base/core/java/android/net/metrics/DnsEvent.java