If you have a Joyent SmartMachine you can see this blog post http://blog.nodejs.org/2012/04/25/profiling-node-js/ to create a visual representation of the time your app takes in various functions. This should give an indication of the blockiness.
On May 28, 1:46 pm, Boris Egorov <dolphin...@gmail.com> wrote: > Hi all. > > I am using following simple code (showed by Jan Jongboom) to detect, > whether my event loop was blocked for more that specified amount of time: > > > var last = new Date(), > > setInterval(function () { > > var delta = new Date() - last; > > if (delta > 2) { > > console.error('EVENT LOOP BLOCKED FOR', delta, "ms"); > > } > > last = new Date(); > > }, 1); > > Works ok, but now i am interesting - *how to find actual functions, that > are blocking my loop*? Any ideas? May be inspecting queued tasks for next > loop? But i did not found a way to do that from docs. > p.s. I've searched group archive but found nothing appropriate. > p.p.s. I know that i can look for sync function invocation style, but it's > a lot of work even for my app code, and i had no guarantee, that it's not a > module that i used. > Thanks in advance. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en