From 0373840f4261c59e5c836cff0148f9b228e3bceb Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 5 Jan 2022 15:36:59 -0800 Subject: [PATCH] turn-off auto-tuning only when --concurrent is specified (#3909) --- cmd/admin-speedtest.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cmd/admin-speedtest.go b/cmd/admin-speedtest.go index ee1a2bcb..e543efd6 100644 --- a/cmd/admin-speedtest.go +++ b/cmd/admin-speedtest.go @@ -183,15 +183,9 @@ func mainAdminSpeedtest(ctx *cli.Context) error { } globalSpeedTestVerbose = ctx.Bool("verbose") - autotune := false - - if ctx.NumFlags() == 0 { - autotune = true - } - - if ctx.NumFlags() == 2 && globalSpeedTestVerbose { - autotune = true - } + // Turn-off autotuning only when "concurrent" is specified + // in all other scenarios keep auto-tuning on. + autotune := !ctx.IsSet("concurrent") resultCh, err := client.Speedtest(ctxt, madmin.SpeedtestOpts{ Size: int(size),