Pull request 2334: AGDNS-2627-query-statistics
Merge in DNS/adguard-home from AGDNS-2627-query-statistics to master
Squashed commit of the following:
commit 9bfdadfddda04404742683d69f6455a56ae68763
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Jan 30 14:40:06 2025 +0300
chlog: fix typo
commit 73764b79bda4dd26695160ab7cee6f222ed0e3a9
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Jan 30 14:14:56 2025 +0300
chlog: fix typo
commit 5900b360feb12ced95d10fd11510d81450cd5443
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Jan 30 14:10:34 2025 +0300
all: upd chlog
commit 4a9d79a2596839d16f18e45dd13939cdc011361e
Merge: 76d037122 cc2006f61
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Jan 30 14:01:46 2025 +0300
Merge branch 'master' into AGDNS-2627-query-statistics
commit 76d0371220c3a6268e0fb0e775a01ab5a609e443
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Mon Jan 27 20:32:44 2025 +0300
all: upd chlog
commit 496cbba94ec8c1684001f8ed0245b51a73d5bffe
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Jan 23 19:44:26 2025 +0300
all: imp code
commit 4795a2c8fbf49cede106641e97892c008dccd2e9
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Tue Jan 21 17:48:00 2025 +0300
all: query statistics
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/stats"
|
||||
"github.com/AdguardTeam/dnsproxy/proxy"
|
||||
"github.com/AdguardTeam/golibs/logutil/slogutil"
|
||||
"github.com/AdguardTeam/golibs/netutil"
|
||||
"github.com/AdguardTeam/golibs/testutil"
|
||||
@@ -78,15 +79,19 @@ func TestStats(t *testing.T) {
|
||||
Client: cliIPStr,
|
||||
Result: stats.RFiltered,
|
||||
ProcessingTime: time.Microsecond * 123456,
|
||||
Upstream: respUpstream,
|
||||
UpstreamTime: time.Microsecond * 222222,
|
||||
UpstreamStats: []*proxy.UpstreamStatistics{{
|
||||
Address: respUpstream,
|
||||
QueryDuration: time.Microsecond * 222222,
|
||||
}},
|
||||
}, {
|
||||
Domain: reqDomain,
|
||||
Client: cliIPStr,
|
||||
Result: stats.RNotFiltered,
|
||||
ProcessingTime: time.Microsecond * 123456,
|
||||
Upstream: respUpstream,
|
||||
UpstreamTime: time.Microsecond * 222222,
|
||||
UpstreamStats: []*proxy.UpstreamStatistics{{
|
||||
Address: respUpstream,
|
||||
QueryDuration: time.Microsecond * 222222,
|
||||
}},
|
||||
}}
|
||||
|
||||
wantData := &stats.StatsResp{
|
||||
|
||||
Reference in New Issue
Block a user