diff --git a/internal/data/gorm_test.go b/internal/data/gorm_test.go index ab347d6..5245aaa 100644 --- a/internal/data/gorm_test.go +++ b/internal/data/gorm_test.go @@ -28,7 +28,7 @@ func Test_db(t *testing.T) { start2 := time.Now() errCount := 0 var wg sync.WaitGroup - const concurrency = 50 // 调整并发数 + const concurrency = 500 // 调整并发数 wg.Add(concurrency) for i := 0; i < concurrency; i++ { @@ -49,5 +49,5 @@ func Test_db(t *testing.T) { } wg.Wait() - fmt.Printf("\n--------------连接请求,总请求耗时: %v,失败次数: %d--------------\n", time.Since(start2), errCount) + fmt.Printf("\n--------------连接请求,总请求耗时: %v,总数: %d, 失败次数: %d--------------\n", time.Since(start2), concurrency, errCount) }