Do not store all payload in memory #115

Merged
fyrchik merged 5 commits from fyrchik/xk6-frostfs:streaming_payload into master 2024-09-04 19:51:18 +00:00
9 changed files with 9 additions and 9 deletions
Showing only changes of commit d8af19cc83 - Show all commits

View file

@ -88,7 +88,7 @@ func (g *Generator) fillBuffer() {
}
}
func (g *Generator) GenPayload(calcHash bool) Payload {
func (g *Generator) GenPayload() Payload {
if g.streaming {
return NewStreamPayload(g.size, g.seed.Add(1), g.typ)
}

View file

@ -149,7 +149,7 @@ export function obj_write() {
};
const container = container_list[Math.floor(Math.random() * container_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = grpc_client.put(container, headers, payload, write_grpc_chunk_size);
if (!resp.success) {
log.withField("cid", container).error(resp.error);

View file

@ -174,7 +174,7 @@ export function obj_write() {
};
const container = container_list[Math.floor(Math.random() * container_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = grpc_client.put(container, headers, payload, write_grpc_chunk_size);
if (!resp.success) {
log.withField("cid", container).error(resp.error);

View file

@ -97,7 +97,7 @@ export function obj_write() {
const container = container_list[Math.floor(Math.random() * container_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const data = {
field: uuidv4(),
// Because we use `file` wrapping and it is not straightforward to use streams here,

View file

@ -128,7 +128,7 @@ export function obj_write() {
};
const container = container_list[Math.floor(Math.random() * container_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = local_client.put(container, headers, payload);
if (!resp.success) {
if (resp.abort) {

View file

@ -145,7 +145,7 @@ export function obj_write() {
const key = __ENV.OBJ_NAME || uuidv4();
const bucket = bucket_list[Math.floor(Math.random() * bucket_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = s3_client.put(bucket, key, payload);
if (!resp.success) {
log.withFields({bucket: bucket, key: key}).error(resp.error);

View file

@ -172,7 +172,7 @@ export function obj_write() {
const key = __ENV.OBJ_NAME || uuidv4();
const bucket = bucket_list[Math.floor(Math.random() * bucket_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = s3_client.put(bucket, key, payload);
if (!resp.success) {
log.withFields({bucket: bucket, key: key}).error(resp.error);

View file

@ -92,7 +92,7 @@ export function obj_write_multipart() {
const key = __ENV.OBJ_NAME || uuidv4();
const bucket = bucket_list[Math.floor(Math.random() * bucket_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = s3_client.multipart(bucket, key, write_multipart_part_size, write_multipart_vu_count, payload);
if (!resp.success) {
log.withFields({bucket: bucket, key: key}).error(resp.error);

View file

@ -124,7 +124,7 @@ export function obj_write() {
const key = __ENV.OBJ_NAME || uuidv4();
const bucket = bucket_list[Math.floor(Math.random() * bucket_list.length)];
const payload = generator.genPayload(registry_enabled);
const payload = generator.genPayload();
const resp = s3_client.put(bucket, key, payload);
if (!resp.success) {
if (resp.abort) {