-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to identify synchronous executed functions? #495
Comments
@helio-frota - can you elaborate a little more on how you are drawing a relation between |
@gireeshpunathil sure thing, sorry I believe I caused confusion also to myself by reading the description above again : ) This issue is more asking if it is possible to create a relationship between About the native modules, I'll try to fix that part in the comment.
Anyway, that is kind of confusing to me because Maybe the
But at the same time, I start to think: What is considered a slow sync call (that may depend on each app requisites) And thinking more on that (execution time of sync functions) maybe makes no sense to make a diff between functions I believe I was naive to think that out of 20 functions executed if 15 are asynchronous then the other 5 are synchronous. 😄 |
I don't think so. If I understood correctly the objective is to identify sync functions that are blocking the event-loop, so, I don't think that I believe that I may not have understood what you want to achieve from that. |
@RafaelGSS exactly, my initial thoughts don't make any sense, it would be good to update the document. from: Then close this issue 👍 thanks |
I believe CPU Profiling is common sense in this case. |
Specific correlation between the two is difficult, but you can track event loop blocking time and time spent executing a given function, then just loosely correlate them based on time. You won't know X set of async tasks were delayed because of Y function taking too long, but you will know that Y function frequently blocks and would likely be a leading cause of async task delays. |
@Qard thank you for that extra information 👍 that clarifies more to me in relation to my first question and the subsequent comment. Also, I've updated the document with a suggestion based on @RafaelGSS response, that is why I decided to close this issue. |
When looking at flamegraph tools we can see some executed functions.
I was thinking if is it possible to:
a) To see all the executed functions without native modules
or
b) To see all the executed functions using native modules
c) to use async_hooks + the results of a) or b) above to make a diff between all the sync and async executed functions.
If something like that is possible to do, then it will probably help to answer this:
#439
https://docs.google.com/document/d/1Yip9zU_8axfZwN-clGMeoNWVYHZPfBjepLV3Ur2JjwA/edit#
TODO: Investigate how to identify synchronous calls on running processes
Let's imagine an app is made of 20 functions, even if all the 20 were not executed if we are able to identify 4 of 13 making a difference for example 4 sync and 9 async, I believe that is really helpful to try to answer that item.
please let me know if that makes any sense 👍
The text was updated successfully, but these errors were encountered: