Google Coder Web Development uses a Raspberry Pi as the web server, and development environment.
npm install -g autocannon npm install -g clinicAutocannon generates sample requests. e.g. autocannon -c100 url will generate 100 concurrent random requests. Clinic clinic doctor --on-port='autocannon -c100 url' -- node index.js opens an HTML file with all sorts of profile data. clinic flame --on-port='autocannon -c100 url' -- node index.js generates a flame graph, which you can drill down into in order to find the slow parts of a script.+
Note that this does NOT mean NodeJS can't take advantage of multiple processors or multi-threaded work:
Use cluster when you want to parallelize the SAME flow of execution and server listening.
Use child_process when you want DIFFERENT flows of execution working together
and take advantage of built in Inter-Process Communication to pass objects between the processes.
|file: /Techref/language/java/script/server.htm, 5KB, , updated: 2019/4/1 11:30, local time: 2019/7/22 05:56,
|©2019 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
|Did you find what you needed?|
Welcome to massmind.org!
Welcome to techref.massmind.org!