forked from TrueCloudLab/xk6-frostfs
Evgenii Stratonikov
14a5eac5b1
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>
8 lines
222 B
JavaScript
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;
|
|
}
|