node-clinic
node-clinic copied to clipboard
Why an I/O issue is detected with a minimal http server api ?
Expected Behavior
No detected issues
Current Behavior
Detected a potential I/O Issue.
Steps to Reproduce (for bugs)
- Create a small service.js with the sample bellow
- run it
clinic doctor -- node service.js
Sample upload
const http = require('http');
const port = 3002;
const server = http.createServer((req, res) => {
res.end('ok');
});
server.listen(port, () => console.log('service listening on port %d', port));
Environment
- Clinic version: 2.2.0
- Doctor version: 3.10.0
- Node version: 10.14.1
- Operating system and version: MacOS 10.13.6
Why a Potential I/O issue is detected is this 6 lines of code
?
It seems you are not applying enough load to the process. Specifically, you are doing only one request. We should probably detect this situation and display a relevant disclaimer.
Can you upload the doctor profile? clinic upload PROFILE
.
hi @mcollina thanks, correct I just test it with 1 request. I wanted to see the base values of clinic
when a single request happen. But my surprise was that with this minimal api code I got potential I/O issues
-
https://upload.clinicjs.org/public/2991b15936cab363f01b30c70e6c58ee196c8db83718765c16aa4fb9c4cc1f76/11586.clinic-doctor.html
-
https://upload.clinicjs.org/public/ab4d3b48bf5ce6b627e1a16c982713a3cd71eae30ae0ea84740d95f5ae88047e/16713.clinic-flame.html#selectedNode=239&zoomedNode=&exclude=3e&merged=true
Yeah! I tried running doctor with high concurrency ( using ab and autocannon ) of about 400 requests per second ( this is what I'm aiming to hit ), and got similar results. For high concurrency and a large number of requests, doctor showed possible Garbage collector issues. I think it would we awesome if a reasonable benchmark ( expected limit ) is showed for all the plots. Or should there be a possibility to allow for passing custom limits? 🤔
@mcollina - Still an issue in the latest Doctor (v4.1.0). Any recommendation on how we can do this detection?