Skip to content
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

Question: Can we generate flamegraphs for async functions based on total time, similar to bubbleprof graphs? #453

Open
Jason5Lee opened this issue Jun 23, 2023 · 2 comments

Comments

@Jason5Lee
Copy link

I'm attempting to profile my NodeJS to identify the components slowing down my API, which might be due to an async operation. So far, all the flamegraph tools I've come across only consider CPU time. This led me to discover this project, with the bubbleprof graph proving quite useful.

However, I'm curious whether it's possible to use flamegraphs to illustrate the time taken by async operations? For instance, in the case of an API async function, I want to know which function call or which 'await' is the hot path. Would this be easy to integrate? Or does a tool already exist that accomplishes this?

@RafaelGSS
Copy link
Contributor

You want to consider idle time + CPU time right? You can't do it with Clinic.js. You will need to instrument your app manually through performance.now() measurements or dynamic instrumentation.

@Jason5Lee
Copy link
Author

You want to consider idle time + CPU time right? You can't do it with Clinic.js. You will need to instrument your app manually through performance.now() measurements or dynamic instrumentation.

What could be the rationale behind creating Bubbleprof graph for async operation analysis, as opposed to utilizing the existing Flamegraph?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants