lib/flamegraph.rb in flamegraph-0.0.3 vs lib/flamegraph.rb in flamegraph-0.0.4
- old
+ new
@@ -9,11 +9,13 @@
backtraces = FastStack.profile(fidelity) do
yield
end
+ embed_resources = filename && !opts.key?(:embed_resources)
+
renderer = Flamegraph::Renderer.new(backtraces)
- rendered = renderer.graph_html
+ rendered = renderer.graph_html(embed_resources)
if filename
File.open(filename,"w") do |f|
f.write(rendered)
end