I am using kubectl-flame to run async-profiler on k8s pods.
When profiling a microservice that runs multiple replicas - I have a separate *.svg flamegraph for each pod.
QUESTION: Is there a way to merge those *.svg files into one graph?
I am using kubectl-flame to run async-profiler on k8s pods.
When profiling a microservice that runs multiple replicas - I have a separate *.svg flamegraph for each pod.
QUESTION: Is there a way to merge those *.svg files into one graph?
Since version 2.0, released more than a year ago, async-profiler no longer generates svg
output. It now creates Flame Graphs on HTML 5 Canvas. Such graphs are smaller in size and a way more responsive comparing to svg
.
As to merging, it is much easier with another format supported by async profiler - collapsed stacks. Use -o collapsed
profiler option to dump output in that format.
Then, to merge profiles in collapsed
format, just concatenate the corresponding output files.
A flame graph can be constructed from collapsed
output with a converter included in async-profiler package. Here is how to do it:
java -cp converter.jar FlameGraph input.collapsed output.html