summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Frank Li <lifr@google.com> 2018-12-20 13:08:06 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-12-20 13:08:06 +0000
commit3cdd48ea3af6e59bc8156a352cb0d69813fc4e5e (patch)
tree7a650c1b0631682614b5de059d47fdbad3bf2fea
parent811a5191dc89b06030ad8184fd337089ff7d12cd (diff)
parent157fc55403e0badf5cc79ce0d51702ed28ed7c13 (diff)
Merge "Define DNS statistic data atom in atoms.proto file"
-rw-r--r--cmds/statsd/src/atoms.proto49
1 files changed, 49 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index bdcdc536759d..fd62843701b2 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -172,6 +172,7 @@ message Atom {
WifiEnabledStateChanged wifi_enabled_state_changed = 113;
WifiRunningStateChanged wifi_running_state_changed = 114;
AppCompacted app_compacted = 115;
+ NetworkDnsEventReported network_dns_event_Reported = 116;
}
// Pulled events will start at field 10000.
@@ -3712,3 +3713,51 @@ message AppCompacted {
// The process state at the time of compaction.
optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN];
}
+
+/**
+ * Logs the latency period(in microseconds) and the return code of
+ * the DNS(Domain Name System) lookups.
+ * These 4 methods(GETADDRINFO,GETHOSTBYNAME,GETHOSTBYADDR,RES_NSEND)
+ * to get info(address or hostname) from DNS server(or DNS cache).
+ * Logged from:
+ * /system/netd/server/DnsProxyListener.cpp
+ */
+message NetworkDnsEventReported {
+ // The types of the DNS lookups, as defined in
+ //system/netd/server/binder/android/net/metrics/INetdEventListener.aidl
+ enum EventType {
+ EVENT_UNKNOWN = 0;
+ EVENT_GETADDRINFO = 1;
+ EVENT_GETHOSTBYNAME = 2;
+ EVENT_GETHOSTBYADDR = 3;
+ EVENT_RES_NSEND = 4;
+ }
+ optional EventType event_type = 1;
+
+ // The return value of the DNS resolver for each DNS lookups.
+ //bionic/libc/include/netdb.h
+ //system/netd/resolv/include/netd_resolv/resolv.h
+ enum ReturnCode {
+ EAI_NOERR = 0;
+ EAI_ADDRFAMILY = 1;
+ EAI_AGAIN = 2;
+ EAI_BADFLAGS = 3;
+ EAI_FAIL = 4;
+ EAI_FAMILY = 5;
+ EAI_MEMORY = 6;
+ EAI_NODATA = 7;
+ EAI_NONAME = 8;
+ EAI_SERVICE = 9;
+ EAI_SOCKTYPE = 10;
+ EAI_SYSTEM = 11;
+ EAI_BADHINTS = 12;
+ EAI_PROTOCOL = 13;
+ EAI_OVERFLOW = 14;
+ RESOLV_TIMEOUT = 255;
+ EAI_MAX = 256;
+ }
+ optional ReturnCode return_code = 2;
+
+ // The latency period(in microseconds) it took for this DNS lookup to complete.
+ optional int32 latency_micros = 3;
+}