All checks were successful
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
17 lines
No EOL
458 B
JavaScript
17 lines
No EOL
458 B
JavaScript
import {uuidv4} from './k6-utils-1.4.0.js';
|
|
|
|
export function generateS3Key() {
|
|
let width = parseInt(__ENV.DIR_WIDTH || '0');
|
|
let height = parseInt(__ENV.DIR_HEIGHT || '0');
|
|
|
|
let key = ''
|
|
if (width > 0 && height > 0) {
|
|
for (let index = 0; index < height; index++) {
|
|
const w = Math.floor(Math.random() * width) + 1;
|
|
key = key + 'dir' + w + '/';
|
|
}
|
|
}
|
|
|
|
key += (__ENV.OBJ_NAME || uuidv4());
|
|
return key;
|
|
} |