From: Charlie Gordon Date: Thu, 15 Feb 2024 08:59:50 +0000 (+0100) Subject: pass node-js command line arguments to microbench X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=8e21b967386b9179a86b21bd461512255b22263e;p=quickjs.git pass node-js command line arguments to microbench --- 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);