xk6-frostfs/scenarios/libs/datagen.js
Evgenii Stratonikov 14a5eac5b1 [#117] scenarios: Refactor data generator construction
1. Make it easier to change new parameters.
2. Fix a bug where the generator was created even for read-only
   scenarios.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-12 13:19:03 +03:00

8 lines
222 B
JavaScript

import datagen from 'k6/x/frostfs/datagen';
export function newGenerator(condition) {
if (condition) {
return datagen.generator(1024 * parseInt(__ENV.WRITE_OBJ_SIZE), __ENV.PAYLOAD_TYPE || "");
}
return undefined;
}