From 8e21b967386b9179a86b21bd461512255b22263e Mon Sep 17 00:00:00 2001 From: Charlie Gordon Date: Thu, 15 Feb 2024 09:59:50 +0100 Subject: [PATCH] pass node-js command line arguments to microbench --- tests/microbench.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/microbench.js b/tests/microbench.js index 302f2ad..6bf0b83 100644 --- a/tests/microbench.js +++ b/tests/microbench.js @@ -1136,6 +1136,9 @@ function main(argc, argv, g) save_result("microbench-new.txt", log_data); } -if (typeof scriptArgs === "undefined") +if (typeof scriptArgs === "undefined") { scriptArgs = []; + if (typeof process.argv === "object") + scriptArgs = process.argv.slice(1); +} main(scriptArgs.length, scriptArgs, this);