MCPcopy
hub / github.com/AdguardTeam/dnsproxy / QueryStatistics

Method QueryStatistics

proxy/dnscontext.go:141–143  ·  view source on GitHub ↗

QueryStatistics returns the DNS query statistics for both the upstream and fallback DNS servers. The returned statistics will be nil until a DNS lookup has been performed. Depending on whether the DNS request was successfully resolved and the upstream mode, the returned statistics consist of: - I

()

Source from the content-addressed store, hash-verified

139//
140// Both s and any data returned from its methods must not be modified.
141func (dctx *DNSContext) QueryStatistics() (s *QueryStatistics) {
142 return dctx.queryStatistics
143}
144
145// calcFlagsAndSize lazily calculates some values required for Resolve method.
146func (dctx *DNSContext) calcFlagsAndSize() {

Callers 2

TestCollectQueryStatsFunction · 0.95
isCachedWithCustomConfigFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestCollectQueryStatsFunction · 0.76
isCachedWithCustomConfigFunction · 0.76