mosdns/pkg/rate_limiter/rate_limiter_test.go
dengxiongjian cd761e8145
Some checks are pending
Test mosdns / build (push) Waiting to run
新增Mikrotik API 插入解析ip
2025-07-31 11:28:55 +08:00

21 lines
273 B
Go

package rate_limiter
import (
"testing"
"time"
"golang.org/x/time/rate"
)
func BenchmarkXxx(b *testing.B) {
now := time.Now()
var l *limiterEntry
for i := 0; i < b.N; i++ {
l = &limiterEntry{
l: rate.NewLimiter(0, 0),
lastSeen: now,
}
}
_ = l
}