Just saw your post and found the project you named (toobusy) actually very usefull.
But as I don't see the reason to do such a thing in c++, I just wrote the same in pure js. https://github.com/kof/node-busy If you often receive the busy callback ... its pretty sure you need to scale .... isn't it? Oleg Am 11.05.2013 um 04:48 schrieb Alex Kocharin <[email protected]>: > Hi everyone, > > I'm looking for a way to check a responsiveness of node.js app, and find out > if it tries to do more work that it should, and I need to scale up it somehow. > > CPU time isn't it. If I see 100% cpu load, it might indicate that node.js is > currently successfully serving thousands of requests, or it might indicate > that someone put in extra semicolon in "while(1); {blablabla}" sentence, and > there's no way to distinguish these. > > On the other hand, a difference between time when some callback should fire > and a time when it actually fires shows what's needed. If some callback > executes a second after it should, we surely are in trouble. There is a lot > of packages like 'toobusy' seem to do exactly that, they fire up a callback > every second and measure a time when it fired. But it sounds like too rough > or imprecise way. > > When I was thinking about that, I remembered how load average in unix kernels > is calculated. If there was such thing for node.js core, that would solve an > issue. I mean, just like 'os kernel load average' shows amount of currently > runnable processes, I'd like to see 'node.js event loop load average' that > shows amount of currently runnable functions in node.js event loop. Is there > such thing? > > Anyway, what performance metrics does event loop expose? Maybe some libuv > functions I can use to get that? Or maybe I can register a custom c++ > function that gets executed in every tick in event loop? > > -- > alex > > -- > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
