commit | e655b1d82201b4885a27a54a8fedfbe458257962 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Wed Aug 28 17:49:59 2019 +0800 |
committer | Mike Yu <yumike@google.com> | Mon Oct 21 15:29:54 2019 +0800 |
tree | f0ba775dd52d239acf6042104d12c39d3fbfcfd5 | |
parent | 7803769cacfd23dc014dd4a15edcb4e9f8ccd670 [diff] |
Modularize resolver statistics The extendibility of the legacy resolver statistics is limited because it was originally designed for libc, which is hard to implement to support other types of DNS, e.g. DNS-over-TLS. Therefore, DnsStats is introduced to manage the statistics in a more general way. DoT statistics is now available from DnsStats and is shown in dumpsys dnsresolver. Example of output from dumpsys dnsresolver: Server statistics: (total, RTT avg, {rcode:counts}, last update) over UDP 8.8.4.4 <no data> 8.8.8.8 <no data> 2001:4860:4860::8844 (7, 2201ms, [NOERROR:4 TIMEOUT:3 ], 2s) 2001:4860:4860::8888 (3, 11ms, [NOERROR:3 ], 4s) over TLS <no server> over TCP 8.8.4.4 <no data> 8.8.8.8 <no data> 2001:4860:4860::8844 <no data> 2001:4860:4860::8888 <no data> Bug: 140286585 Test: atest --include-subdirs packages/modules/DnsResolver Test: checked output in dumpsys dnsresolver Change-Id: I73f0108d5e9bb493cf7eda68252f5a0922149a98
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.