commit | c293f29ffc80ed6af1d8e490b4afdf332d47f31e | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Fri Nov 26 20:01:44 2021 +0800 |
committer | Mike Yu <yumike@google.com> | Fri Dec 03 21:01:38 2021 +0800 |
tree | c0f7715d2185d6a3ff199dae74496a8265fb014f | |
parent | 4c6849713a838610d8ed868598cedec8f2c96e77 [diff] |
Use pull model to get the statistics from DohFrontend As we are adding more fields in Stats, usig lock would become more expensive. Change DohFrontend to fetch the stats by mpsc channel. Besides, this change also contains some cleanups and minor fixes: - Replace mpsc::channel with mpsc::unbounded_channel - Rename connections to connections_accepted in Stats - Change the return type of ClientMap::get_or_create() Bug: 1895315 Test: cd packages/modules/DnsResolver && atest Change-Id: I184d45c148b15389af26ad482b947def0a222e6a
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.