mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-28 16:36:36 +08:00
优化缓存相关代码
This commit is contained in:
@@ -40,10 +40,14 @@ func TestNewCache(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCache_Memory(t *testing.T) {
|
||||
if !testutils.IsSingleTesting() {
|
||||
return
|
||||
}
|
||||
|
||||
testutils.StartMemoryStats(t)
|
||||
|
||||
var cache = NewCache()
|
||||
var count = 2_000_000
|
||||
var count = 20_000_000
|
||||
for i := 0; i < count; i++ {
|
||||
cache.Write("a"+strconv.Itoa(i), 1, time.Now().Unix()+3600)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user