Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "bench:simd" script fails with Missing script: "bench:run:simd" #795

Closed
trivikr opened this issue May 8, 2021 · 3 comments · Fixed by #796
Closed

The "bench:simd" script fails with Missing script: "bench:run:simd" #795

trivikr opened this issue May 8, 2021 · 3 comments · Fixed by #796
Labels
bug Something isn't working

Comments

@trivikr
Copy link
Member

trivikr commented May 8, 2021

Bug Description

The "bench:simd" script fails with Missing script: "bench:run:simd"

Reproducible By

$ npm run bench:simd

Expected Behavior

The bench:simd script runs successfully

Logs & Screenshots

> undici@4.0.0-rc.3 bench:simd
> concurrently -k -s first npm:bench:server npm:bench:run:simd

[bench:server] 
[bench:server] > undici@4.0.0-rc.3 bench:server
[bench:server] > node benchmarks/server.js
[bench:server] 
[bench:run:simd] npm ERR! Missing script: "bench:run:simd"
npm ERR! 
[bench:run:simd] npm ERR! Did you mean one of these?
[bench:run:simd] npm ERR!     npm run bench:simd # run the "bench:simd" package script
[bench:run:simd] npm ERR!     npm run bench:run # run the "bench:run" package script
[bench:run:simd] npm ERR! 
[bench:run:simd] npm ERR! To see a list of scripts, run:
[bench:run:simd] npm ERR!   npm run
[bench:run:simd] 
[bench:run:simd] npm ERR! A complete log of this run can be found in:
[bench:run:simd] npm ERR!     /Users/trivikr/.npm/_logs/2021-05-08T17_16_11_932Z-debug.log
[bench:run:simd] npm run bench:run:simd exited with code 1
--> Sending SIGTERM to other processes..
[bench:server] npm run bench:server exited with code SIGTERM

Environment

$ node -v
v16.1.0

Additional context

N/A

@trivikr trivikr added the bug Something isn't working label May 8, 2021
@trivikr
Copy link
Member Author

trivikr commented May 8, 2021

The fix would depend on whether maintainers want to provide separate benchmark script with simd enabled.

If benchmark includes simd enabled by default, then script bench:simd can be removed:

diff --git a/package.json b/package.json
index b31c415..4d947c6 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,6 @@
     "coverage": "standard | snazzy && tap test/*.js",
     "coverage:ci": "npm run coverage -- --coverage-report=lcovonly",
     "bench": "concurrently -k -s first npm:bench:server npm:bench:run",
-    "bench:simd": "concurrently -k -s first npm:bench:server npm:bench:run:simd",
     "bench:server": "node benchmarks/server.js",
     "prebench:run": "node benchmarks/wait.js",
     "bench:run": "CONNECTIONS=1 node --experimental-wasm-simd benchmarks/benchmark.js && CONNECTIONS=50 node --experimental-wasm-simd benchmarks/benchmark.js",

If an option to run benchmark with sim needs to be provided, then:

  • bench:run: The configuration --experimental-wasm-simd needs to be removed.
  • bench:run:simd: The script needs to be added with --experimental-wasm-simd configuration.

Shown in diff:

diff --git a/package.json b/package.json
index b31c415..cb0fde4 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,8 @@
     "bench:simd": "concurrently -k -s first npm:bench:server npm:bench:run:simd",
     "bench:server": "node benchmarks/server.js",
     "prebench:run": "node benchmarks/wait.js",
-    "bench:run": "CONNECTIONS=1 node --experimental-wasm-simd benchmarks/benchmark.js && CONNECTIONS=50 node --experimental-wasm-simd benchmarks/benchmark.js",
+    "bench:run": "CONNECTIONS=1 node benchmarks/benchmark.js && CONNECTIONS=50 node benchmarks/benchmark.js",
+    "bench:run:simd": "CONNECTIONS=1 node --experimental-wasm-simd benchmarks/benchmark.js && CONNECTIONS=50 node --experimental-wasm-simd benchmarks/benchmark.js",
     "serve:website": "docsify serve .",
     "prepare": "husky install"
   },

@mcollina
Copy link
Member

mcollina commented May 9, 2021

I'd like to keep the simd benchmark.. could you send a PR with that fix?

@trivikr
Copy link
Member Author

trivikr commented May 9, 2021

PR adding bench:run:simd posted at #796

@ronag ronag closed this as completed in #796 May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants