pass node-js command line arguments to microbench

This commit is contained in:
Charlie Gordon 2024-02-15 09:59:50 +01:00
parent 95e0aa0526
commit 8e21b96738
1 changed files with 4 additions and 1 deletions

View File

@ -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);