GithubHelp home page GithubHelp logo

Comments (19)

cblair avatar cblair commented on September 1, 2024 2

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.

from v8-perf.

c4milo avatar c4milo commented on September 1, 2024

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

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

@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.

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

Pulling @bnoordhuis in here since he authored some tools I found, hopefully he's got some useful advice.

from v8-perf.

c4milo avatar c4milo commented on September 1, 2024

@thlorenz BTW, ongoing work with the debugger is in the dev branch, it might need to be also re-sync'd with master.

from v8-perf.

bnoordhuis avatar bnoordhuis commented on September 1, 2024

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.

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

Thanks @bnoordhuis I saw the link to a strong-agent tool on one of your repos, but saw that it requires a STRONGLOOP_KEY and doesn't seem to be available on github.

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.

from v8-perf.

deepak1556 avatar deepak1556 commented on September 1, 2024

just did an upgrade to memwatch with nan https://github.com/deepak1556/node-memwatch , @thlorenz thanks for this repo, totally helpful 👍

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

@deepak1556 ah, thanks for the info I'll have a detailed read of whatcha doing in there ;)

from v8-perf.

sidorares avatar sidorares commented on September 1, 2024

@thlorenz https://github.com/sidorares/node-tick/ ?

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

@sidorares I think I saw this before, but I am not sure how this helps me integrate with chrome tools.
I can just open v8.log directly in chrome://tracing.

What does node-tick give me extra? From the readme I cannot see what it is parsed into and how I can use the resulting output.

from v8-perf.

sidorares avatar sidorares commented on September 1, 2024

I was actually unable to use v8.log with chrome://tracing even with additional flags. I'd like to add html output to node-tick with ui similar to chrome://tracing

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

which version of node are you using (you need to turn on log_timer_events flag)?
The screenshot above was taken from chrome://tracing.

from v8-perf.

sidorares avatar sidorares commented on September 1, 2024

I used 0.10.29 and didn't notice Error: unrecognized flag --log_timer_events
With 0.11.13 I can see v8.log rendered correctly in chrome, thanks!

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

Happy things work for you now.

I had started an issue to collect chrome://tracing related info. Feel free to add your findings there.

from v8-perf.

brendangregg avatar brendangregg commented on September 1, 2024

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.

from v8-perf.

thlorenz avatar thlorenz commented on September 1, 2024

@brendangregg totally agreed and corrected.
Once I create documentation from this I'll make sure to indicate that the flame-chart is a time line of functions calls vs. time spent in function aggregation.

I feel like a more fitting name would be call graph, but flame chart it is.

from v8-perf.

arunoda avatar arunoda commented on September 1, 2024

@brendangregg yep. It's super hard to see things with a timescale.

from v8-perf.

yamsellem avatar yamsellem commented on September 1, 2024

@thlorenz I'm trying to use --log-timer-events as explained in your first post with node 0.12.
The flag is supported but, launching the command seems to block anything from execution (even a simple console.log('Hello World')).

This command will block anything for execution:
node --prof --track_gc_object_stats --trace_gc_verbose --log_timer_events app.js

Any idea on the matter?

from v8-perf.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.