@@ -1263,7 +1263,7 @@ func TestStorage_CustomUpstreamConfig(t *testing.T) {
1263
1263
})
1264
1264
}
1265
1265
1266
- func BenchmarkClearAndSet (b * testing.B ) {
1266
+ func BenchmarkFindParams_Set (b * testing.B ) {
1267
1267
const (
1268
1268
testIPStr = "192.0.2.1"
1269
1269
testCIDRStr = "192.0.2.0/24"
@@ -1332,14 +1332,14 @@ func BenchmarkClearAndSet(b *testing.B) {
1332
1332
// goarch: amd64
1333
1333
// pkg: github.com/AdguardTeam/AdGuardHome/internal/client
1334
1334
// cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
1335
- // BenchmarkClearAndSet /client_id-8 49463488 24.27 ns/op 0 B/op 0 allocs/op
1336
- // BenchmarkClearAndSet /ip_address-8 18740977 62.22 ns/op 0 B/op 0 allocs/op
1337
- // BenchmarkClearAndSet /subnet-8 10848192 110.0 ns/op 0 B/op 0 allocs/op
1338
- // BenchmarkClearAndSet /mac_address-8 8148494 133.2 ns/op 8 B/op 1 allocs/op
1339
- // BenchmarkClearAndSet /bad_id-8 73894278 16.29 ns/op 0 B/op 0 allocs/op
1335
+ // BenchmarkFindParams_Set /client_id-8 49463488 24.27 ns/op 0 B/op 0 allocs/op
1336
+ // BenchmarkFindParams_Set /ip_address-8 18740977 62.22 ns/op 0 B/op 0 allocs/op
1337
+ // BenchmarkFindParams_Set /subnet-8 10848192 110.0 ns/op 0 B/op 0 allocs/op
1338
+ // BenchmarkFindParams_Set /mac_address-8 8148494 133.2 ns/op 8 B/op 1 allocs/op
1339
+ // BenchmarkFindParams_Set /bad_id-8 73894278 16.29 ns/op 0 B/op 0 allocs/op
1340
1340
}
1341
1341
1342
- func BenchmarkFind (b * testing.B ) {
1342
+ func BenchmarkStorage_Find (b * testing.B ) {
1343
1343
const (
1344
1344
cliID = "cid"
1345
1345
cliMAC = "02:00:00:00:00:00"
@@ -1436,8 +1436,8 @@ func BenchmarkFind(b *testing.B) {
1436
1436
// goarch: amd64
1437
1437
// pkg: github.com/AdguardTeam/AdGuardHome/internal/client
1438
1438
// cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
1439
- // BenchmarkFind /client_id-8 6945201 157 .4 ns/op 240 B/op 2 allocs/op
1440
- // BenchmarkFind /ip_address-8 7000094 165.3 ns/op 248 B/op 2 allocs/op
1441
- // BenchmarkFind /subnet-8 6872064 163.6 ns/op 256 B/op 2 allocs/op
1442
- // BenchmarkFind /mac_address-8 5693320 205.2 ns/op 256 B/op 3 allocs/op
1439
+ // BenchmarkStorage_Find /client_id-8 7070107 154 .4 ns/op 240 B/op 2 allocs/op
1440
+ // BenchmarkStorage_Find /ip_address-8 6831823 168.6 ns/op 248 B/op 2 allocs/op
1441
+ // BenchmarkStorage_Find /subnet-8 7209050 167.5 ns/op 256 B/op 2 allocs/op
1442
+ // BenchmarkStorage_Find /mac_address-8 5776131 199.7 ns/op 256 B/op 3 allocs/op
1443
1443
}
0 commit comments