commit | 52cf009bf98d4575e67f96a732f1b715dc588d13 | [log] [tgz] |
---|---|---|
author | chenbruce <chenbruce@google.com> | Wed Aug 18 22:24:56 2021 +0800 |
committer | chenbruce <chenbruce@google.com> | Wed Aug 25 14:54:01 2021 +0800 |
tree | cfe26d359a638f4504c76ab541fc5c5a4081dd52 | |
parent | 9b72daa3b7f3f33fcc5bf25269a9221cf296e904 [diff] |
Subsampling DNS event for mDNS Currently, a device generates some mDNS queries when the user uses mDNS .local resolution. Using the query info by subsampling events based on how interesting they are. Because the number of mDNS query is much less than DNS query, the mDNS subsampling rate is higer than DNS query. - if return_code == 0,2,7 -> log 1 in 1 event - if return_code == default -> log 1 in 1 event Also allow to use experiment flag to update sub-sampling denom. Example for dumpsys dnsresolver: NetId: 100 DnsEvent subsampling map for MDNS: default:1 Bug: 197092658 Test: cd packages/modules/DnsResolver && atest m statsd_testdrive and run "statsd_testdrive 116" Change-Id: I76073aa9a1cea43bda2675334592ed22e96a238e
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.