mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
feat(benchmark): New options for n8n benchmark (#10741)
This commit is contained in:
14
packages/@n8n/benchmark/scripts/utils/flags.mjs
Normal file
14
packages/@n8n/benchmark/scripts/utils/flags.mjs
Normal file
@@ -0,0 +1,14 @@
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* Converts an object of flags to an array of CLI arguments.
|
||||
*
|
||||
* @param {Record<string, string | undefined>} flags
|
||||
*
|
||||
* @returns {string[]}
|
||||
*/
|
||||
export function flagsObjectToCliArgs(flags) {
|
||||
return Object.entries(flags)
|
||||
.filter(([, value]) => value !== undefined)
|
||||
.map(([key, value]) => `--${key}=${value}`);
|
||||
}
|
||||
Reference in New Issue
Block a user