From 843487b025f99f1afe2e45326ca83ca7662f5d81 Mon Sep 17 00:00:00 2001 From: fujiwara Date: Sat, 25 Nov 2023 01:14:03 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=92200=E8=A1=8C?= =?UTF-8?q?=E3=80=81=E6=9C=AB=E5=B0=BE=E3=81=8B=E3=82=89=E5=8F=96=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bench/cmd/bench/supervise.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bench/cmd/bench/supervise.go b/bench/cmd/bench/supervise.go index 976ee90d6..cf9e64c0d 100644 --- a/bench/cmd/bench/supervise.go +++ b/bench/cmd/bench/supervise.go @@ -98,11 +98,12 @@ func fetchAZName(ctx context.Context) (string, error) { return azName, nil } +// messagesの末尾からn行を結合して取得 func joinN(messages []string, n int) string { - if len(messages) > n { - return strings.Join(messages[:n], ",\n") + if len(messages) <= n { + return strings.Join(messages, "\n") } - return strings.Join(messages, ",\n") + return strings.Join(messages[len(messages)-n:], "\n") } func execBench(ctx context.Context, job *Job) (*Result, error) { @@ -280,7 +281,7 @@ var supervise = cli.Command{ }, cli.IntFlag{ Name: "message-limit", - Value: 2000, + Value: 200, Destination: &messageLimit, EnvVar: "SUPERVISOR_MESSAGE_LIMIT", }, From f735834741b12313cbaca39b5ad9fe9650445506 Mon Sep 17 00:00:00 2001 From: fujiwara Date: Sat, 25 Nov 2023 01:15:29 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B2=A0=E8=8D=B7=E3=83=AC=E3=83=99?= =?UTF-8?q?=E3=83=AB=E3=82=92=E3=83=AD=E3=82=B0=E3=81=AB=E5=87=BA=E3=81=95?= =?UTF-8?q?=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1固定だから混乱するだけ --- bench/cmd/bench/benchmarker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bench/cmd/bench/benchmarker.go b/bench/cmd/bench/benchmarker.go index c0e9d1a7a..3b027e0e6 100644 --- a/bench/cmd/bench/benchmarker.go +++ b/bench/cmd/bench/benchmarker.go @@ -100,7 +100,8 @@ func powWeightSize(m int) int64 { func newBenchmarker(ctx context.Context, contestantLogger *zap.Logger) *benchmarker { var weight int64 = int64(config.BaseParallelism) - contestantLogger.Info("負荷レベル", zap.Int64("level", weight)) + // いま負荷レベルは固定値なので選手に見せる意味がない + // contestantLogger.Info("負荷レベル", zap.Int64("level", weight)) longStreamerClientPool := isupipe.NewClientPool(ctx) streamerClientPool := isupipe.NewClientPool(ctx)