From bedabb1d17d890463a0bb9b528099e55cd3a2977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Thu, 20 Mar 2025 15:30:36 +0800 Subject: [PATCH] redis db --- internal/data/gorm_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }