mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
feat(benchmark): New options for n8n benchmark (#10741)
This commit is contained in:
@@ -36,6 +36,8 @@ async function main() {
|
||||
n8nLicenseCert: config.n8nLicenseCert,
|
||||
n8nTag: config.n8nTag,
|
||||
n8nSetupsToUse,
|
||||
vus: config.vus,
|
||||
duration: config.duration,
|
||||
});
|
||||
} else {
|
||||
await runLocally({
|
||||
@@ -46,6 +48,8 @@ async function main() {
|
||||
n8nTag: config.n8nTag,
|
||||
runDir: config.runDir,
|
||||
n8nSetupsToUse,
|
||||
vus: config.vus,
|
||||
duration: config.duration,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -66,6 +70,8 @@ function readAvailableN8nSetups() {
|
||||
* @property {string} [k6ApiToken]
|
||||
* @property {string} [n8nLicenseCert]
|
||||
* @property {string} [runDir]
|
||||
* @property {string} [vus]
|
||||
* @property {string} [duration]
|
||||
*
|
||||
* @returns {Promise<Config>}
|
||||
*/
|
||||
@@ -87,6 +93,8 @@ async function parseAndValidateConfig() {
|
||||
const n8nLicenseCert = args.n8nLicenseCert || process.env.N8N_LICENSE_CERT || undefined;
|
||||
const runDir = args.runDir || undefined;
|
||||
const env = args.env || 'local';
|
||||
const vus = args.vus;
|
||||
const duration = args.duration;
|
||||
|
||||
if (!env) {
|
||||
printUsage();
|
||||
@@ -102,6 +110,8 @@ async function parseAndValidateConfig() {
|
||||
k6ApiToken,
|
||||
n8nLicenseCert,
|
||||
runDir,
|
||||
vus,
|
||||
duration,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -141,6 +151,8 @@ function printUsage() {
|
||||
console.log(' --debug Enable verbose output');
|
||||
console.log(' --n8nTag Docker tag for n8n image. Default is latest');
|
||||
console.log(' --benchmarkTag Docker tag for benchmark cli image. Default is latest');
|
||||
console.log(' --vus How many concurrent requests to make');
|
||||
console.log(' --duration Test duration, e.g. 1m or 30s');
|
||||
console.log(
|
||||
' --k6ApiToken API token for k6 cloud. Default is read from K6_API_TOKEN env var. If omitted, k6 cloud will not be used',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user