优化测试用例

This commit is contained in:
GoEdgeLab
2024-04-21 19:04:31 +08:00
parent 8b7117a63b
commit 4552099e0e

View File

@@ -206,6 +206,7 @@ func TestList_Map_Performance(t *testing.T) {
func BenchmarkList_Add(b *testing.B) {
var list = expires.NewList()
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
list.Add(rand.Uint64(), fasttime.Now().Unix()+int64(rand.Int()%10_000_000))