How to get time that call-back is pushed to event-loop queue?

47 views
Skip to first unread message

Wei

unread,
May 16, 2014, 6:02:39 PM5/16/14
to nod...@googlegroups.com
Hi there:

Recently we have a problem with Node.js application when the CPU usage is high. We found that event loop queue could be too long, the latency data we measured in callbacks are inaccurate (e.g. with a rest call). The better way is to get the time when the callback is pushed to node's event loop queue? What's the way to get it?

Thanks,
-Wei

Joshua Lunsford

unread,
May 17, 2014, 12:15:49 PM5/17/14
to nod...@googlegroups.com
I would relieve your high CPU issues(create more processes to distribute load to other cores/servers) then see if callbacks are still fine for your operation. Alternative is to perform sync calls to rest service. Use Node-Fibers for threading... maybe node-sync to make it easy while experimenting.

Happy noding!

-Joshua Taylor Lundford


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/d24e3e36-f018-4611-9e73-e554b47e1250%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks, 
Joshua Taylor Lunsford
Reply all
Reply to author
Forward
0 new messages