aboutsummaryrefslogtreecommitdiff
path: root/ResolverController.cpp
diff options
context:
space:
mode:
authorMike Yu <yumike@google.com>2019-08-28 17:49:59 +0800
committerMike Yu <yumike@google.com>2019-10-21 15:29:54 +0800
commite655b1d82201b4885a27a54a8fedfbe458257962 (patch)
treef0ba775dd52d239acf6042104d12c39d3fbfcfd5 /ResolverController.cpp
parent7803769cacfd23dc014dd4a15edcb4e9f8ccd670 (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
Diffstat (limited to 'ResolverController.cpp')
-rw-r--r--ResolverController.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ResolverController.cpp b/ResolverController.cpp
index 6927e5f4..5fecc611 100644
--- a/ResolverController.cpp
+++ b/ResolverController.cpp
@@ -356,6 +356,7 @@ void ResolverController::dump(DumpWriter& dw, unsigned netId) {
dw.decIndent();
}
dw.println("Concurrent DNS query timeout: %d", wait_for_pending_req_timeout_count[0]);
+ resolv_stats_dump(dw, netId);
}
dw.decIndent();
}