Hi Jase,

Unfortunately, I don't have any real-world examples, where this information 
might be very helpful. But I can imagine the following applications of such 
feature (or features):

   - Educational purposes. Someone could create a GUI app that would be 
   demonstrating call stack, event loop, and task queues information. This app 
   would help Node.js beginners with understanding how node internal 
   architecture. Quite many performance issues in Node.js apps are related 
   with poor understanding of these principles. Similar to what Phillip 
   Roberts did for event loop in browsers: http://latentflip.com/loupe
   - Profilers. As far as I can see, V8 profiler doesn't consider event 
   loop phases and queue sizes. If it would be gathering this information, 
   then, for example, it might help with understanding that the app spends 
   lots of its time in the nextTick queue.
   - Libraries. Not sure about this one, but I guess that developers of 
   libraries, which manipulate with nextTick and timers, might benefit from 
   having the event loop context during debugging.



среда, 28 ноября 2018 г., 16:54:20 UTC+3 пользователь Jase Williams написал:
>
> Hi Andrey
>
> Could you explain what scenario you are in where this information is 
> helpful?
>
> Thanks
> Jason
>
> On Tue, Nov 20, 2018 at 9:10 AM Andrey Pechkurov <[email protected] 
> <javascript:>> wrote:
>
>> Hi guys.
>>
>> This is a question that I've already posted an issue on nodejs/help repo and 
>> was adviced to address the question to V8 team: 
>> https://github.com/nodejs/help/issues/1621
>>
>> I wonder if there is a way to see the current event loop phase and 
>> microtasks queues (and other task queues too) during debugging a node 
>> application? I haven't found such stuff on the net, but maybe it's possible.
>>
>> By that I mean being able to put a breakpoint somewhere in your code and see 
>> the diagnostic context of the event loop (and other related stuff like the 
>> worker thread pool) execution.
>>
>> As far as I undestand Node.js' code and internals, V8 and libuv are 
>> orchestrated by Node.js, so it's node's (or other runtime's) responsibility 
>> to provide this context to V8. And with this context V8 debugger would be 
>> able to output this data further down the debugging chain. For me it sounds 
>> like a cross-component feature that will require certain changes in Node.js 
>> and V8. But I'd like to have a confirmation from you, guys.
>>
>> So, I wonder if it's somehow available in the node or V8 itself, or any 
>> 3rd-party library, or it's a brand new feature?
>>
>> -- 
>> -- 
>> v8-dev mailing list
>> [email protected] <javascript:>
>> http://groups.google.com/group/v8-dev
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" 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/d/optout.

Reply via email to