优化测试用例

This commit is contained in:
刘祥超
2024-04-21 19:04:31 +08:00
parent 6c5f4e0705
commit c8f440e24c

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))