forked from TrueCloudLab/xk6-frostfs
[#65] go.mod: Update dependencies
See https://github.com/grafana/k6/pull/3075/, it is not yet in any release. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
6151005b4d
commit
1025e80f11
9 changed files with 755 additions and 161 deletions
97
go.mod
97
go.mod
|
@ -3,31 +3,32 @@ module git.frostfs.info/TrueCloudLab/xk6-frostfs
|
|||
go 1.17
|
||||
|
||||
require (
|
||||
git.frostfs.info/TrueCloudLab/frostfs-node v0.22.2-0.20230313113918-4e244686cf03
|
||||
git.frostfs.info/TrueCloudLab/frostfs-node v0.22.2-0.20230522084814-731bf5d0ee66
|
||||
git.frostfs.info/TrueCloudLab/frostfs-s3-gw v0.24.1-0.20230403110435-01afa1cae425
|
||||
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230329125804-552219b8e130
|
||||
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230519144724-f5b23eb22569
|
||||
git.frostfs.info/TrueCloudLab/tzhash v1.8.0
|
||||
github.com/aws/aws-sdk-go-v2 v1.16.3
|
||||
github.com/aws/aws-sdk-go-v2/config v1.15.5
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.26.9
|
||||
github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf
|
||||
github.com/dop251/goja v0.0.0-20230427124612-428fc442ff5f
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/nspcc-dev/neo-go v0.101.0
|
||||
github.com/nspcc-dev/neo-go v0.101.1
|
||||
github.com/panjf2000/ants/v2 v2.5.0
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/sirupsen/logrus v1.9.2
|
||||
github.com/stretchr/testify v1.8.3
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
go.k6.io/k6 v0.38.2
|
||||
go.k6.io/k6 v0.44.2-0.20230524054758-add1a5fe5019
|
||||
go.uber.org/zap v1.24.0
|
||||
golang.org/x/sys v0.8.0
|
||||
)
|
||||
|
||||
require (
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.11.2-0.20230315095236-9dc375346703 // indirect
|
||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.15.1-0.20230519114017-0c67b8fefa41 // indirect
|
||||
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 // indirect
|
||||
git.frostfs.info/TrueCloudLab/hrw v1.2.0 // indirect
|
||||
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 // indirect
|
||||
github.com/aws/aws-sdk-go v1.44.6 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.12.0 // indirect
|
||||
|
@ -45,63 +46,77 @@ require (
|
|||
github.com/aws/smithy-go v1.11.2 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bluele/gcache v0.0.2 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
||||
github.com/dlclark/regexp2 v1.10.0 // indirect
|
||||
github.com/fatih/color v1.15.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-sourcemap/sourcemap v2.1.4-0.20211119122758-180fcef48034+incompatible // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 // indirect
|
||||
github.com/gorilla/mux v1.8.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect
|
||||
github.com/hashicorp/golang-lru v0.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/klauspost/compress v1.15.13 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.16.5 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/minio/highwayhash v1.0.2 // indirect
|
||||
github.com/minio/sio v0.3.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
||||
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd // indirect
|
||||
github.com/nats-io/jwt/v2 v2.4.1 // indirect
|
||||
github.com/nats-io/nats.go v1.22.1 // indirect
|
||||
github.com/nats-io/nats.go v1.25.0 // indirect
|
||||
github.com/nats-io/nkeys v0.4.4 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/nspcc-dev/rfc6979 v0.2.0 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/onsi/gomega v1.20.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_golang v1.13.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/prometheus/client_golang v1.15.1 // indirect
|
||||
github.com/prometheus/client_model v0.4.0 // indirect
|
||||
github.com/prometheus/common v0.44.0 // indirect
|
||||
github.com/prometheus/procfs v0.10.0 // indirect
|
||||
github.com/serenize/snaker v0.0.0-20201027110005-a7ad2135616e // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/afero v1.9.3 // indirect
|
||||
github.com/spf13/afero v1.9.5 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.15.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.2 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
golang.org/x/crypto v0.7.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20221227203929-1b447090c38c // indirect
|
||||
golang.org/x/net v0.8.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
golang.org/x/time v0.1.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
|
||||
google.golang.org/grpc v1.52.0 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/guregu/null.v3 v3.3.0 // indirect
|
||||
go.opentelemetry.io/otel v1.15.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.15.1 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.15.1 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.15.1 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
|
||||
go.uber.org/atomic v1.11.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.9.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sync v0.2.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
||||
google.golang.org/grpc v1.55.0 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
gopkg.in/guregu/null.v3 v3.5.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
|
|
@ -7,9 +7,11 @@ import (
|
|||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"git.frostfs.info/TrueCloudLab/xk6-frostfs/internal/local/rawclient"
|
||||
"github.com/dop251/goja"
|
||||
"go.k6.io/k6/js/modules"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
vu modules.VU
|
||||
rc *rawclient.RawClient
|
||||
}
|
||||
|
||||
|
@ -30,7 +32,7 @@ type (
|
|||
)
|
||||
|
||||
func (c *Client) Put(containerID string, headers map[string]string, payload goja.ArrayBuffer) PutResponse {
|
||||
id, err := c.rc.Put(mustParseContainerID(containerID), nil, headers, payload.Bytes())
|
||||
id, err := c.rc.Put(c.vu.Context(), mustParseContainerID(containerID), nil, headers, payload.Bytes())
|
||||
if err != nil {
|
||||
return PutResponse{Error: err.Error()}
|
||||
}
|
||||
|
@ -41,14 +43,14 @@ func (c *Client) Put(containerID string, headers map[string]string, payload goja
|
|||
}
|
||||
|
||||
func (c *Client) Get(containerID, objectID string) GetResponse {
|
||||
if _, err := c.rc.Get(mustParseContainerID(containerID), mustParseObjectID(objectID)); err != nil {
|
||||
if _, err := c.rc.Get(c.vu.Context(), mustParseContainerID(containerID), mustParseObjectID(objectID)); err != nil {
|
||||
return GetResponse{Error: err.Error()}
|
||||
}
|
||||
return GetResponse{Success: true}
|
||||
}
|
||||
|
||||
func (c *Client) Delete(containerID, objectID string) DeleteResponse {
|
||||
if err := c.rc.Delete(mustParseContainerID(containerID), mustParseObjectID(objectID)); err != nil {
|
||||
if err := c.rc.Delete(c.vu.Context(), mustParseContainerID(containerID), mustParseObjectID(objectID)); err != nil {
|
||||
return DeleteResponse{Error: err.Error()}
|
||||
}
|
||||
return DeleteResponse{Success: true}
|
||||
|
|
|
@ -114,7 +114,7 @@ func (r *RootModule) GetOrCreateEngine(ctx context.Context, configFile string, d
|
|||
// Create and initialize engine for the given configFile if it doesn't exist already
|
||||
if r.ng == nil {
|
||||
r.configFile = configFile
|
||||
appCfg := config.New(config.Prm{}, config.WithConfigFile(configFile))
|
||||
appCfg := config.New(configFile, "", "")
|
||||
ngOpts, shardOpts, err := storageEngineOptionsFromConfig(appCfg, debug)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("creating engine options from config: %v", err)
|
||||
|
@ -131,7 +131,7 @@ func (r *RootModule) GetOrCreateEngine(ctx context.Context, configFile string, d
|
|||
if err := r.ng.Open(); err != nil {
|
||||
return nil, fmt.Errorf("opening engine: %v", err)
|
||||
}
|
||||
if err := r.ng.Init(); err != nil {
|
||||
if err := r.ng.Init(ctx); err != nil {
|
||||
return nil, fmt.Errorf("initializing engine: %v", err)
|
||||
}
|
||||
} else if configFile != r.configFile {
|
||||
|
@ -204,7 +204,7 @@ func (s *Local) Connect(configFile, hexKey string, debug bool) (*Client, error)
|
|||
}
|
||||
}),
|
||||
)
|
||||
return &Client{rc}, nil
|
||||
return &Client{vu: s.vu, rc: rc}, nil
|
||||
}
|
||||
|
||||
type epochState struct{}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
package rawclient
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
|
@ -31,7 +32,7 @@ func New(ng *engine.StorageEngine, opts ...Option) *RawClient {
|
|||
return client
|
||||
}
|
||||
|
||||
func (c *RawClient) Put(containerID cid.ID, ownerID *user.ID, headers map[string]string, payload []byte) (oid.ID, error) {
|
||||
func (c *RawClient) Put(ctx context.Context, containerID cid.ID, ownerID *user.ID, headers map[string]string, payload []byte) (oid.ID, error) {
|
||||
sz := len(payload)
|
||||
|
||||
attrs := make([]object.Attribute, len(headers))
|
||||
|
@ -71,7 +72,7 @@ func (c *RawClient) Put(containerID cid.ID, ownerID *user.ID, headers map[string
|
|||
req.WithObject(obj)
|
||||
|
||||
start := time.Now()
|
||||
_, err = c.ng.Put(req)
|
||||
err = c.ng.Put(ctx, req)
|
||||
c.onPut(uint64(sz), err, time.Since(start))
|
||||
if err != nil {
|
||||
return oid.ID{}, err
|
||||
|
@ -80,7 +81,7 @@ func (c *RawClient) Put(containerID cid.ID, ownerID *user.ID, headers map[string
|
|||
return id, nil
|
||||
}
|
||||
|
||||
func (c *RawClient) Get(containerID cid.ID, objectID oid.ID) (*object.Object, error) {
|
||||
func (c *RawClient) Get(ctx context.Context, containerID cid.ID, objectID oid.ID) (*object.Object, error) {
|
||||
var addr oid.Address
|
||||
addr.SetContainer(containerID)
|
||||
addr.SetObject(objectID)
|
||||
|
@ -89,7 +90,7 @@ func (c *RawClient) Get(containerID cid.ID, objectID oid.ID) (*object.Object, er
|
|||
req.WithAddress(addr)
|
||||
|
||||
start := time.Now()
|
||||
res, err := c.ng.Get(req)
|
||||
res, err := c.ng.Get(ctx, req)
|
||||
|
||||
var sz uint64
|
||||
obj := res.Object()
|
||||
|
@ -101,7 +102,7 @@ func (c *RawClient) Get(containerID cid.ID, objectID oid.ID) (*object.Object, er
|
|||
return obj, nil
|
||||
}
|
||||
|
||||
func (c *RawClient) Delete(containerID cid.ID, objectID oid.ID) error {
|
||||
func (c *RawClient) Delete(ctx context.Context, containerID cid.ID, objectID oid.ID) error {
|
||||
var addr oid.Address
|
||||
addr.SetContainer(containerID)
|
||||
addr.SetObject(objectID)
|
||||
|
@ -110,7 +111,7 @@ func (c *RawClient) Delete(containerID cid.ID, objectID oid.ID) error {
|
|||
req.WithAddress(addr)
|
||||
|
||||
start := time.Now()
|
||||
_, err := c.ng.Delete(req)
|
||||
_, err := c.ng.Delete(ctx, req)
|
||||
c.onDelete(err, time.Since(start))
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ func (n *Native) Connect(endpoint, hexPrivateKey string, dialTimeout, streamTime
|
|||
prmDial.SetStreamTimeout(time.Duration(streamTimeout) * time.Second)
|
||||
}
|
||||
|
||||
err = cli.Dial(prmDial)
|
||||
err = cli.Dial(n.vu.Context(), prmDial)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("dial endpoint: %s %w", endpoint, err)
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ func (*frostfs) DeleteContainer(context.Context, cid.ID, *session.Container) err
|
|||
}
|
||||
|
||||
func (f *frostfs) ReadObject(ctx context.Context, prm layer.PrmObjectRead) (*layer.ObjectPart, error) {
|
||||
obj, err := f.Get(prm.Container, prm.Object)
|
||||
obj, err := f.Get(ctx, prm.Container, prm.Object)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ func (f *frostfs) CreateObject(ctx context.Context, prm layer.PrmObjectCreate) (
|
|||
for _, attr := range prm.Attributes {
|
||||
hdrs[attr[0]] = attr[1]
|
||||
}
|
||||
return f.Put(prm.Container, &prm.Creator, hdrs, payload)
|
||||
return f.Put(ctx, prm.Container, &prm.Creator, hdrs, payload)
|
||||
}
|
||||
|
||||
func (f *frostfs) DeleteObject(context.Context, layer.PrmObjectDelete) error {
|
||||
|
|
|
@ -49,7 +49,7 @@ func (r nodeResponse) GetParentID() uint64 { return r.parentID }
|
|||
func (r nodeResponse) GetTimestamp() uint64 { return r.ts }
|
||||
|
||||
func (s treeServiceEngineWrapper) GetNodes(ctx context.Context, p *tree.GetNodesParams) ([]tree.NodeResponse, error) {
|
||||
nodeIDs, err := s.ng.TreeGetByPath(p.BktInfo.CID, p.TreeID, pilorama.AttributeFilename, p.Path, p.LatestOnly)
|
||||
nodeIDs, err := s.ng.TreeGetByPath(ctx, p.BktInfo.CID, p.TreeID, pilorama.AttributeFilename, p.Path, p.LatestOnly)
|
||||
if err != nil {
|
||||
if errors.Is(err, pilorama.ErrTreeNotFound) {
|
||||
// This is needed in order for the tree implementation to create the tree/node
|
||||
|
@ -62,7 +62,7 @@ func (s treeServiceEngineWrapper) GetNodes(ctx context.Context, p *tree.GetNodes
|
|||
|
||||
resps := make([]tree.NodeResponse, 0, len(nodeIDs))
|
||||
for _, nodeID := range nodeIDs {
|
||||
m, parentID, err := s.ng.TreeGetMeta(p.BktInfo.CID, p.TreeID, nodeID)
|
||||
m, parentID, err := s.ng.TreeGetMeta(ctx, p.BktInfo.CID, p.TreeID, nodeID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ func (s treeServiceEngineWrapper) GetSubTree(ctx context.Context, bktInfo *data.
|
|||
|
||||
var traverse func(nodeID uint64, curDepth uint32) error
|
||||
traverse = func(nodeID uint64, curDepth uint32) error {
|
||||
m, parentID, err := s.ng.TreeGetMeta(bktInfo.CID, treeID, nodeID)
|
||||
m, parentID, err := s.ng.TreeGetMeta(ctx, bktInfo.CID, treeID, nodeID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("getting meta: %v", err)
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ func (s treeServiceEngineWrapper) GetSubTree(ctx context.Context, bktInfo *data.
|
|||
return nil
|
||||
}
|
||||
|
||||
children, err := s.ng.TreeGetChildren(bktInfo.CID, treeID, nodeID)
|
||||
children, err := s.ng.TreeGetChildren(ctx, bktInfo.CID, treeID, nodeID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("getting children: %v", err)
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ func (s treeServiceEngineWrapper) AddNode(ctx context.Context, bktInfo *data.Buc
|
|||
Position: s.pos,
|
||||
Size: s.size,
|
||||
}
|
||||
mv, err := s.ng.TreeMove(desc, treeID, &pilorama.Move{
|
||||
mv, err := s.ng.TreeMove(ctx, desc, treeID, &pilorama.Move{
|
||||
Parent: parentID,
|
||||
Child: pilorama.RootID,
|
||||
Meta: pilorama.Meta{Items: mapToKV(meta)},
|
||||
|
@ -149,7 +149,7 @@ func (s treeServiceEngineWrapper) AddNodeByPath(ctx context.Context, bktInfo *da
|
|||
Position: s.pos,
|
||||
Size: s.size,
|
||||
}
|
||||
mvs, err := s.ng.TreeAddByPath(desc, treeID, pilorama.AttributeFilename, path, mapToKV(meta))
|
||||
mvs, err := s.ng.TreeAddByPath(ctx, desc, treeID, pilorama.AttributeFilename, path, mapToKV(meta))
|
||||
if err != nil {
|
||||
return pilorama.TrashID, err
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ func (s treeServiceEngineWrapper) MoveNode(ctx context.Context, bktInfo *data.Bu
|
|||
Position: s.pos,
|
||||
Size: s.size,
|
||||
}
|
||||
_, err := s.ng.TreeMove(desc, treeID, &pilorama.Move{
|
||||
_, err := s.ng.TreeMove(ctx, desc, treeID, &pilorama.Move{
|
||||
Parent: parentID,
|
||||
Child: nodeID,
|
||||
Meta: pilorama.Meta{
|
||||
|
@ -184,7 +184,7 @@ func (s treeServiceEngineWrapper) RemoveNode(ctx context.Context, bktInfo *data.
|
|||
Position: s.pos,
|
||||
Size: s.size,
|
||||
}
|
||||
_, err := s.ng.TreeMove(desc, treeID, &pilorama.Move{
|
||||
_, err := s.ng.TreeMove(ctx, desc, treeID, &pilorama.Move{
|
||||
Parent: pilorama.TrashID,
|
||||
Child: nodeID,
|
||||
})
|
||||
|
|
|
@ -9,18 +9,22 @@ import (
|
|||
|
||||
func Report(vu modules.VU, metric *metrics.Metric, value float64) {
|
||||
metrics.PushIfNotDone(vu.Context(), vu.State().Samples, metrics.Sample{
|
||||
Metric: metric,
|
||||
Time: time.Now(),
|
||||
Value: value,
|
||||
TimeSeries: metrics.TimeSeries{
|
||||
Metric: metric,
|
||||
},
|
||||
Time: time.Now(),
|
||||
Value: value,
|
||||
})
|
||||
}
|
||||
|
||||
func ReportDataReceived(vu modules.VU, value float64) {
|
||||
vu.State().BuiltinMetrics.DataReceived.Sink.Add(
|
||||
metrics.Sample{
|
||||
Metric: &metrics.Metric{},
|
||||
Value: value,
|
||||
Time: time.Now()},
|
||||
TimeSeries: metrics.TimeSeries{
|
||||
Metric: &metrics.Metric{},
|
||||
},
|
||||
Value: value,
|
||||
Time: time.Now()},
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -28,8 +32,10 @@ func ReportDataSent(vu modules.VU, value float64) {
|
|||
state := vu.State()
|
||||
state.BuiltinMetrics.DataSent.Sink.Add(
|
||||
metrics.Sample{
|
||||
Metric: &metrics.Metric{},
|
||||
Value: value,
|
||||
Time: time.Now()},
|
||||
TimeSeries: metrics.TimeSeries{
|
||||
Metric: &metrics.Metric{},
|
||||
},
|
||||
Value: value,
|
||||
Time: time.Now()},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue