feat(benchmark): New options for n8n benchmark (#10741)

This commit is contained in:
Tomi Turtiainen
2024-09-10 09:25:41 +03:00
committed by GitHub
parent 96db501a61
commit d81f21d08e
14 changed files with 165 additions and 117 deletions

View 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}`);
}