[#99] Adding read age param to improve k6 runs stability

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
Andrey Berezin 2023-10-02 20:08:43 +03:00
parent 7db7751334
commit 1311051f60
4 changed files with 8 additions and 0 deletions

View file

@ -49,6 +49,7 @@ if (registry_enabled && delete_age) {
); );
} }
const read_age = __ENV.READ_AGE ? parseInt(__ENV.READ_AGE) : 10;
let obj_to_read_selector = undefined; let obj_to_read_selector = undefined;
if (registry_enabled) { if (registry_enabled) {
obj_to_read_selector = registry.getSelector( obj_to_read_selector = registry.getSelector(
@ -57,6 +58,7 @@ if (registry_enabled) {
__ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0, __ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0,
{ {
status: "created", status: "created",
age: read_age,
} }
) )
} }

View file

@ -49,6 +49,7 @@ if (registry_enabled && delete_age) {
); );
} }
const read_age = __ENV.READ_AGE ? parseInt(__ENV.READ_AGE) : 10;
let obj_to_read_selector = undefined; let obj_to_read_selector = undefined;
if (registry_enabled) { if (registry_enabled) {
obj_to_read_selector = registry.getSelector( obj_to_read_selector = registry.getSelector(
@ -57,6 +58,7 @@ if (registry_enabled) {
__ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0, __ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0,
{ {
status: "created", status: "created",
age: read_age,
} }
) )
} }

View file

@ -48,6 +48,7 @@ if (registry_enabled && delete_age) {
); );
} }
const read_age = __ENV.READ_AGE ? parseInt(__ENV.READ_AGE) : 10;
let obj_to_read_selector = undefined; let obj_to_read_selector = undefined;
if (registry_enabled) { if (registry_enabled) {
obj_to_read_selector = registry.getSelector( obj_to_read_selector = registry.getSelector(
@ -56,6 +57,7 @@ if (registry_enabled) {
__ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0, __ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0,
{ {
status: "created", status: "created",
age: read_age,
} }
) )
} }

View file

@ -48,6 +48,7 @@ if (registry_enabled && delete_age) {
); );
} }
const read_age = __ENV.READ_AGE ? parseInt(__ENV.READ_AGE) : 10;
let obj_to_read_selector = undefined; let obj_to_read_selector = undefined;
if (registry_enabled) { if (registry_enabled) {
obj_to_read_selector = registry.getSelector( obj_to_read_selector = registry.getSelector(
@ -56,6 +57,7 @@ if (registry_enabled) {
__ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0, __ENV.SELECTION_SIZE ? parseInt(__ENV.SELECTION_SIZE) : 0,
{ {
status: "created", status: "created",
age: read_age,
} }
) )
} }