k6 extension to test and benchmark FrostFS related protocols.
 
 
 
 
Go to file
Vladimir Domnich 37e27f6791 [#23] Implement deletion of objects
1. Added simple lock mechanism to reset obj selector. This prevents
   most of concurrency issues when multiple VUs try to reset selector.
2. Added logic to delete objects to grpc and s3 scenarios.
3. Added registry support to http scenario.
4. Deletion logic was not implemented for http scenario, because
   http gateway does not provide web-method to delete objects.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-10-03 17:34:20 +03:00
.github [#21] Improve iteration logic in obj selector 2022-09-30 15:18:45 +03:00
examples [#11] Add container creation 2022-06-18 22:00:52 +03:00
internal [#23] Implement deletion of objects 2022-10-03 17:34:20 +03:00
scenarios [#23] Implement deletion of objects 2022-10-03 17:34:20 +03:00
.gitignore [#19] Implement objects registry module 2022-09-23 13:36:27 +03:00
CONTRIBUTING.md Add CONTRIBUTING guidelines 2022-06-01 17:54:48 +03:00
LICENSE [#8] Add LICENSE 2022-06-01 17:09:34 +03:00
README.md [#19] Implement objects registry module 2022-09-23 13:36:27 +03:00
go.mod [#19] Implement objects registry module 2022-09-23 13:36:27 +03:00
go.sum [#19] Implement objects registry module 2022-09-23 13:36:27 +03:00
neofs.go [#19] Implement objects registry module 2022-09-23 13:36:27 +03:00

README.md

NeoFS

k6 extension to test and benchmark NeoFS related protocols.


License: GPL v3

xk6-neofs

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

  • Go
  • Git
  1. Install xk6 framework for extending k6:
go install go.k6.io/xk6/cmd/xk6@latest
  1. Clone this repository
git clone github.com/nspcc-dev/xk6-neofs
cd xk6-neofs
  1. Build the binary:
xk6 build --with github.com/nspcc-dev/xk6-neofs=.
  1. Run k6:
./k6 run test-script.js

API

Native

Create native client with connect method. Arguments:

  • neofs storage node endpoint
  • hex encoded private key (empty value produces random key)
import native from 'k6/x/neofs/native';
const neofs_cli = native.connect("s01.neofs.devenv:8080", "")

Methods

  • putContainer(params). The params is a dictionary (e.g. {acl:'public-read-write',placement_policy:'REP 3',name:'container-name',name_global_scope:'false'}). Returns dictionary with success boolean flag, container_id string, and error string.
  • setBufferSize(size). Sets internal buffer size for data upload and download. Default is 64 KiB.
  • put(container_id, headers, payload). Returns dictionary with success boolean flag, object_id string, and error string.
  • get(container_id, object_id). Returns dictionary with success boolean flag, and error string.
  • onsite(container_id, payload). Returns NeoFS object instance with prepared headers. Invoke put(headers) method on this object to upload it into NeoFS. It returns dictionary with success boolean flag, object_id string and error string.

S3

Create s3 client with connect method. Arguments:

  • s3 gateway endpoint

Credentials are taken from default AWS configuration files and ENVs.

import s3 from 'k6/x/neofs/s3';
const s3_cli = s3.connect("http://s3.neofs.devenv:8080")

Methods

  • createBucket(bucket, params). Returns dictionary with success boolean flag and error string. The params is a dictionary (e.g. {acl:'private',lock_enabled:'true',location_constraint:'ru'})
  • put(bucket, key, payload). Returns dictionary with success boolean flag and error string.
  • get(bucket, key). Returns dictionary with success boolean flag and error string.

Examples

See native protocol and s3 test suit examples in examples dir.

License