-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Tools and resources regarding Node.js and Performance Tools Integration #4
Comments
FWIW, Strongloop folks are revamping v8-profiler, I'm not sure if they are releasing their UI tools open source, though. From where I left off in node-webkit-agent, debugger agent is pretty close, the rest of the agents are fairly straight forward. Although, I'm not entirely sure about flamegraphs. Unfortunately, I switched gears and I'm not actively working on the project. However, I'm willing to re-take efforts and be incentivized. ;D |
@c4milo thanks, will have a look into it. From ease of use perspective it's the best I found so far. Too bad timeline and metrics like GC events are not there. |
Pulling @bnoordhuis in here since he authored some tools I found, hopefully he's got some useful advice. |
Our (StrongLoop's) tools aren't libre but we'll be releasing an on-premise version in the near future that is gratis for non-commercial use and covers most of the things mentioned. By the way, memwatch is effectively unmaintained and has at least one serious bug, see lloyd/node-memwatch#50. |
Thanks @bnoordhuis I saw the link to a strong-agent tool on one of your repos, but saw that it requires a I'm trying to gather completely open tools and techniques here that everyone can use without signing up for anything. Also thanks for the warning related to memwatch. I'll add that warning to the resources. |
just did an upgrade to memwatch with nan https://github.com/deepak1556/node-memwatch , @thlorenz thanks for this repo, totally helpful 👍 |
@deepak1556 ah, thanks for the info I'll have a detailed read of whatcha doing in there ;) |
@sidorares I think I saw this before, but I am not sure how this helps me integrate with chrome tools. What does |
I was actually unable to use v8.log with |
which version of node are you using (you need to turn on |
I used 0.10.29 and didn't notice |
Happy things work for you now. I had started an issue to collect |
It's worth noting that what Chrome have implemented is what they call a "flame chart", which is not the same as a "flame graph". A flame chart shows the passage of time on the x-axis. A flame graph sorts alphabetically on the x-axis, for maximum merging. I wish Chrome would add an option so that you could view either, since they have the data anyway. Flame graphs are explained here: http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html I think flame charts can solve some time-based problems that flame graphs cannot, but the first profile I want to see is the flame graph, as it can better fit the profile data on one screen. |
@brendangregg totally agreed and corrected. I feel like a more fitting name would be call graph, but flame chart it is. |
@brendangregg yep. It's super hard to see things with a timescale. |
@thlorenz I'm trying to use This command will block anything for execution: Any idea on the matter? |
I'm very interested in this topic, I need some metrics from our node.js/mocha test builds like the flame charts from chrome://tracing (actually I'd like the flame graphs like @brendangregg mentioned), but I need them pretty passively so I can convince my team to review them during PRs. Working through this list starting with trace-viewer, will post what I find, but interested if anyone's already done this. |
goal
I'm trying to gather resources and tools that make it easier to profile Node.js apps ideally by integrating with Chrome Dev tools and
chrome://tracing
.what I found so far
Documentation of tools to analyse the data has been started here but the integration part with Node.js is still missing.
I tried to gather some free and open source tools that try to make this easier and would love to get some feedback and/or further tool suggestions. Pointers to any resources that document anything related are also greatly appreciated.
tools
base/trace_event
perf
tool output to .cpuprofile files readable by chromiums devtoolswebkit-devtools-agent looks very promising, but doesn't show flamegraphs and has no time line support.
techniques
With a version of node that has a
--log-timer-events
as part ofv8-options
, run the app in profiling mode and load the resultingv8.log
into Chrome at chrome://tracing.Check for supported flag:
➝ node --v8-options | grep log_timer_events --log_timer_events (Time events including external callbacks.)
Profile app to generate
v8.log
including GC events.Loading into chrome://tracing will yield a flame chart similar to the below:
A detailed explanation is outlined in creating v8 profiling timeline plots although some of the information seems a bit outdated.
what I'm interested in
The idea is to find a way to use the built in Chrome tools to profile Node.js apps the same way as is currently possible
for JavaScript apps running in the browser.
Interesting metrics to gather:
Additionally integration with
chrome://tracing
by passing flags like--log_timer_events
are of interest.Both, CLI and GUI support would be nice to have as well as real-time and historical data.
The text was updated successfully, but these errors were encountered: