From 9b30bdfff8d4d4e840425cf830b1cbfe462a693b Mon Sep 17 00:00:00 2001 From: Zhou Ting Date: Mon, 25 Dec 2023 16:51:05 +0800 Subject: [PATCH] Make EnableSha256 in mc perf object test configurable Signed-off-by: Zhou Ting --- perf-object.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perf-object.go b/perf-object.go index fdcfa897..b43c0194 100644 --- a/perf-object.go +++ b/perf-object.go @@ -66,6 +66,7 @@ type SpeedtestOpts struct { StorageClass string // Choose type of storage-class to be used while performing I/O Bucket string // Choose a custom bucket name while performing I/O NoClear bool // Avoid cleanup after running an object speed test + EnableSha256 bool // Enable calculating sha256 for uploads } // Speedtest - perform speedtest on the MinIO servers @@ -101,6 +102,9 @@ func (adm *AdminClient) Speedtest(ctx context.Context, opts SpeedtestOpts) (chan if opts.NoClear { queryVals.Set("noclear", "true") } + if opts.EnableSha256 { + queryVals.Set("enableSha256", "true") + } resp, err := adm.executeMethod(ctx, http.MethodPost, requestData{ relPath: adminAPIPrefix + "/speedtest",