This is a script to convert Genero profiler output to a format suitable for FlameGraph.
Flame Graphs will allow you to visualize your programs bottlenecks.
Follow this steps:
Run your program with "-p" param. It will output the profiler data on stderr:
$ fglrun -p your_program.42r 2> your_program_profiler.log
Use stackcollapse-4gl.py:
$ python stackcollapse-4gl.py your_program_profiler.log > your_program_profiler.folded
Generate FlameGraph using Brendan D. Gregg's flamegraph.pl:
$ ./flamegraph.pl your_program_profiler.folded > your_program_profiler.svg
You can also do all in one line:
$ python stackcollapse-4gl.py your_program_profiler.log | ./flamegraph.pl > your_program_profiler.svg
Usage: stackcollapse-4gl.py [options] [infile] > output.folded
-ot # Generate stacks using time spent per stack (default)
-oc # Generate stacks using number of calls per stack