Comments (1)
When using blocked-at we had to tune the threshold down very low with the following code:
const http = require('http')
const port = 4000
const blockedAt = require('blocked-at');
blockedAt((time, stack) => {
console.log(`Blocked for ${time}ms, operation started here:`, stack)
}, {threshold:1, trimFalsePositives:true});
const requestHandler = (request, response) => {
response.end('{"debug":"return from debug"}')
}
const server = http.createServer(requestHandler)
server.listen(port, (err) => {
if (err) {
return console.log('error:', err)
}
console.log(`http server listening on port: ${port}`)
})
But we saw many false positives with the blocked-at code itself and a few items from the node internals:
Blocked for 2.17335595703125ms, operation started here: [ ' at HTTPParser.emitInitNative (internal/async_hooks.js:131:43)',
' at connectionListenerInternal (_http_server.js:336:10)',
' at defaultTriggerAsyncIdScope (internal/async_hooks.js:281:19)',
' at Server.connectionListener (_http_server.js:313:3)',
' at Server.emit (events.js:180:13)',
' at TCP.onconnection (net.js:1558:8)' ]
We want to ensure we can accurately detect main thread blocking as we add each of the elements back to our app and wanted to ask your thoughts on the accuracy of these methods to observe main thread blocking.
from node-blocked.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-blocked.