forked from TrueCloudLab/xk6-frostfs
removed ClientlLogMode
Signed-off-by: m.malygina <m.malygina@yadro.com>
This commit is contained in:
parent
2f00260594
commit
e987b6aef9
1 changed files with 6 additions and 8 deletions
|
@ -8,14 +8,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/stats"
|
"git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/stats"
|
||||||
"github.com/aws/aws-sdk-go-v2/aws"
|
"github.com/aws/aws-sdk-go-v2/aws"
|
||||||
"github.com/aws/aws-sdk-go-v2/config"
|
|
||||||
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
|
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||||
"github.com/dop251/goja"
|
"github.com/dop251/goja"
|
||||||
"go.k6.io/k6/js/modules"
|
"go.k6.io/k6/js/modules"
|
||||||
"go.k6.io/k6/metrics"
|
"go.k6.io/k6/metrics"
|
||||||
"log"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -53,19 +51,19 @@ type (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *Client) Put(bucket, key string, payload goja.ArrayBuffer) PutResponse {
|
func (c *Client) Put(bucket, key string, payload goja.ArrayBuffer) PutResponse {
|
||||||
cfg, err := config.LoadDefaultConfig(c.vu.Context())
|
//cfg, err := config.LoadDefaultConfig(c.vu.Context())
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
//}
|
||||||
|
|
||||||
// log the request with body along with received response
|
// log the request with body along with received response
|
||||||
//cfg.ClientLogMode = aws.LogResponseWithBody
|
//cfg.ClientLogMode = aws.LogResponseWithBody
|
||||||
client := s3.NewFromConfig(cfg)
|
//client := s3.NewFromConfig(cfg)
|
||||||
rdr := bytes.NewReader(payload.Bytes())
|
rdr := bytes.NewReader(payload.Bytes())
|
||||||
sz := rdr.Size()
|
sz := rdr.Size()
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
_, err = client.PutObject(c.vu.Context(), &s3.PutObjectInput{
|
_, err = c.cli.PutObject(c.vu.Context(), &s3.PutObjectInput{
|
||||||
Bucket: aws.String(bucket),
|
Bucket: aws.String(bucket),
|
||||||
Key: aws.String(key),
|
Key: aws.String(key),
|
||||||
Body: rdr,
|
Body: rdr,
|
||||||
|
|
Loading…
Reference in a new issue