etsy / statsd-jvm-profiler

Simple JVM Profiler Using StatsD and Other Metrics Backends
MIT License
330 stars 93 forks source link

Bad rendering of Flame Graph in Firefox (it is OK in Chrome) #25

Closed ibobak closed 9 years ago

ibobak commented 9 years ago

Hi, Andrew.

See what I have in the Firefox: http://screencast.com/t/7XHV32R5 Now look what I have in the Chrome: http://screencast.com/t/CnwS6tjsOlY

Steps to reproduce: 1) download the application is the same as in my previous test - http://sourceforge.net/projects/suprfractalthng/

2) run commands

export _JAVA_OPTIONS='-javaagent:/var/lib/statsd-jvm-profiler-0.8.3-SNAPSHOT.jar=server=192.168.56.101,port=8086,reporter=InfluxDBReporter,database=monitoring,username=root,password=root,prefix=bigdata.profiler.v1.v2.v3.v4.v5,tagMapping=SKIP.SKIP.username.job.flow.stage.phase'

java -jar superfractalthing_0.8.3.jar

3) click on some mandelbrott sets, and then let the app to wait for 10-15 minutes - until it will generate those two "waiting" stacktraces.

P.S. By the way, if you could give a hint how to get the SVG file (instead of html page with D3JS code) - I would be very happy. It would be nice to have influxdb_dump.py - just to get the file with traces and the pass it to the Flame Graph native builder script (flamegraph.pl the_dumped_file > some.svg)

ajsquared commented 9 years ago

I can reproduce that. As you might guess I usually use Chrome and didn't test that in Firefox :)

The node.js library that generates the flame graphs doesn't do a great job creating SVGs, which is why it's using the d3 implementation instead.

Some kind of script to dump the traces formatted in a way to work with the flamegraph.pl script is certainly possible. I can take a look at adding that.

ajsquared commented 9 years ago

@ibobak I've added a script to dump the traces from InfluxDB in a format suitable for use with flamegraph.pl. See https://github.com/etsy/statsd-jvm-profiler/tree/master/visualization#influxdb_dumppy for documentation on its use.