allow sha256 payload to be configurable for object perf test (#18712)

Signed-off-by: Zhou Ting <ting.z.zhou@intel.com>
This commit is contained in:
Zhou Ting
2023-12-30 15:56:50 +08:00
committed by GitHub
parent a50ea92c64
commit 31d16f6cc2
6 changed files with 9 additions and 1 deletions

View File

@@ -1304,6 +1304,7 @@ func (s *peerRESTServer) SpeedTestHandler(w http.ResponseWriter, r *http.Request
concurrentStr := r.Form.Get(peerRESTConcurrent)
storageClass := r.Form.Get(peerRESTStorageClass)
bucketName := r.Form.Get(peerRESTBucket)
enableSha256 := r.Form.Get(peerRESTEnableSha256) == "true"
size, err := strconv.Atoi(sizeStr)
if err != nil {
@@ -1328,6 +1329,7 @@ func (s *peerRESTServer) SpeedTestHandler(w http.ResponseWriter, r *http.Request
duration: duration,
storageClass: storageClass,
bucketName: bucketName,
enableSha256: enableSha256,
})
if err != nil {
result.Error = err.Error()