From 4927d473bf19bbab7a641fad9eb2fde9e6561c45 Mon Sep 17 00:00:00 2001 From: vearne Date: Thu, 11 Jul 2024 12:14:08 +0800 Subject: [PATCH] update queue size --- internal/command/grpc_automate.go | 2 +- internal/command/http_automate.go | 2 +- main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/command/grpc_automate.go b/internal/command/grpc_automate.go index 9f11653..5546859 100644 --- a/internal/command/grpc_automate.go +++ b/internal/command/grpc_automate.go @@ -58,7 +58,7 @@ func HandleSingleFileGrpc(workerNum int, filePath string) (*ResultInfo, []GrpcTe testcases := resource.GrpcTestCases[filePath] slog.Info("[start]HandleSingleFileGrpc, filePath:%v, len(testcase):%v", filePath, len(testcases)) - futureChan := make(chan executor.Future, 10) + futureChan := make(chan executor.Future, len(testcases)) pool := executor.NewFixedGPool(context.Background(), workerNum) defer pool.WaitTerminate() diff --git a/internal/command/http_automate.go b/internal/command/http_automate.go index da2916f..676f22f 100644 --- a/internal/command/http_automate.go +++ b/internal/command/http_automate.go @@ -87,7 +87,7 @@ func HandleSingleFileHttp(workerNum int, filePath string) (*ResultInfo, []HttpTe testcases := resource.HttpTestCases[filePath] slog.Info("[start]HandleSingleFileHttp, filePath:%v, len(testcase):%v", filePath, len(testcases)) - futureChan := make(chan executor.Future, 10) + futureChan := make(chan executor.Future, len(testcases)) pool := executor.NewFixedGPool(context.Background(), workerNum) defer pool.WaitTerminate() diff --git a/main.go b/main.go index cbec194..ce4aa53 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( ) const ( - version = "v0.1.0" + version = "v0.1.1" ) func main() {