forked from TrueCloudLab/xk6-frostfs
Fix setting options
Signed-off-by: Мария Малыгина <m.malygina@yadro.com>
This commit is contained in:
parent
4af4498e32
commit
6f01a038e5
1 changed files with 4 additions and 3 deletions
|
@ -77,13 +77,14 @@ func (c *Client) Multipart(bucket, key string, objPartSize int, payload goja.Arr
|
|||
return PutResponse{Success: false, Error: fmt.Sprintf("part size '%d' must be greater than '%d'(5 MB)", objPartSize, multipartUploadMinPartSize)}
|
||||
}
|
||||
start := time.Now()
|
||||
uploader := manager.NewUploader(c.cli)
|
||||
uploader := manager.NewUploader(c.cli, func(u *manager.Uploader) {
|
||||
u.PartSize = objPartSize
|
||||
uploader.Concurrency = concurrency
|
||||
})
|
||||
result, err := uploader.Upload(context.TODO(), &s3.PutObjectInput{
|
||||
Bucket: aws.String(bucket),
|
||||
Key: aws.String(key),
|
||||
Body: payload.Bytes(),
|
||||
PartSize: objPartSize,
|
||||
Concurrency: concurrency,
|
||||
})
|
||||
if err != nil {
|
||||
stats.Report(c.vu, objPutFails, 1)
|
||||
|
|
Loading…
Reference in a new issue