mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-01 04:40:54 +08:00
实现IP黑白名单、国家|地区封禁、省份封禁
This commit is contained in:
@@ -61,9 +61,12 @@ func TestMemoryGrid_Compress(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkMemoryGrid_Performance(b *testing.B) {
|
||||
runtime.GOMAXPROCS(1)
|
||||
|
||||
grid := NewGrid(1024)
|
||||
for i := 0; i < b.N; i++ {
|
||||
grid.WriteInt64([]byte("key:"+strconv.Itoa(i)), int64(i), 3600)
|
||||
key := "key:" + strconv.Itoa(i)
|
||||
grid.WriteInt64([]byte(key), int64(i), 3600)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user