jonhoo / inferno

A Rust port of FlameGraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top-heavy flamegraphs hide the subtitle

itamarst opened this issue · comments

If there's too long of a line at the top of the graph, the subtitle is hidden, probably because it ends up being covered up

For example:

  1. If the top line is very long: echo "hello 1" | inferno-flamegraph --subtitle "Hello! this is a subtitle" > regular.svg

  2. If the top line is very long because it's an inverted graph: cat flamegraph/test/results/perf-java-stacks-01-collapsed-pid.txt | inferno-flamegraph --subtitle "Hello! this is a subtitle" --inverted > inverted.svg

Interesting.. Is this also an issue in the original flamegraph implementation?

Looks like:

  1. The first variant (very long first line) DTRT in flamegraph.pl, i.e. the subtitle appears.
  2. Inverted ("icicle") mode in flamegraph.pl overwrites the subtitle.

Hmm, curious. Might be worth digging into where the difference in the final SVG lies. I'm pretty swamped these days, but would be happy to take a look at a PR!

I'll see what I can do, thanks for the quick response.