mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	优化测试用例
This commit is contained in:
		@@ -206,6 +206,7 @@ func TestList_Map_Performance(t *testing.T) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func BenchmarkList_Add(b *testing.B) {
 | 
					func BenchmarkList_Add(b *testing.B) {
 | 
				
			||||||
	var list = expires.NewList()
 | 
						var list = expires.NewList()
 | 
				
			||||||
 | 
						b.ResetTimer()
 | 
				
			||||||
	b.RunParallel(func(pb *testing.PB) {
 | 
						b.RunParallel(func(pb *testing.PB) {
 | 
				
			||||||
		for pb.Next() {
 | 
							for pb.Next() {
 | 
				
			||||||
			list.Add(rand.Uint64(), fasttime.Now().Unix()+int64(rand.Int()%10_000_000))
 | 
								list.Add(rand.Uint64(), fasttime.Now().Unix()+int64(rand.Int()%10_000_000))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user