mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(benchmark): Simplify binary data scenario setup and use larger binary file (#10879)
This commit is contained in:
parent
cee57b6504
commit
8fb31e8459
|
@ -3,8 +3,9 @@ import { check } from 'k6';
|
||||||
|
|
||||||
const apiBaseUrl = __ENV.API_BASE_URL;
|
const apiBaseUrl = __ENV.API_BASE_URL;
|
||||||
|
|
||||||
const file = open(__ENV.SCRIPT_FILE_PATH, 'b');
|
// This creates a 2MB file (16 * 128 * 1024 = 2 * 1024 * 1024 = 2MB)
|
||||||
const filename = String(__ENV.SCRIPT_FILE_PATH).split('/').pop();
|
const file = Array.from({ length: 128 * 1024 }, () => Math.random().toString().slice(2)).join('');
|
||||||
|
const filename = 'test.bin';
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
@ -77,7 +77,6 @@ export function handleSummary(data) {
|
||||||
env: {
|
env: {
|
||||||
API_BASE_URL: this.opts.n8nApiBaseUrl,
|
API_BASE_URL: this.opts.n8nApiBaseUrl,
|
||||||
K6_CLOUD_TOKEN: this.opts.k6ApiToken,
|
K6_CLOUD_TOKEN: this.opts.k6ApiToken,
|
||||||
SCRIPT_FILE_PATH: augmentedTestScriptPath,
|
|
||||||
},
|
},
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
})`${k6ExecutablePath} run ${flattedFlags} ${augmentedTestScriptPath}`;
|
})`${k6ExecutablePath} run ${flattedFlags} ${augmentedTestScriptPath}`;
|
||||||
|
|
Loading…
Reference in a new issue