parca icon indicating copy to clipboard operation
parca copied to clipboard

Callgraph visualization

Open monicawoj opened this issue 3 years ago • 2 comments

This PR introduces a new visualization to the profiler - the callgraph. The callgraph is interactive, with a tooltip displaying information of the node appearing on node hover.

This PR also introduces a slight expansion of the FlamegraphTooltip component which will allow the tooltip to be displayed in a 'fixed' position (such as always above or below a given chart) if we decide that it would make sense to have this is a single location that doesn't cover the entire graph <-- which could be useful for screenshots for example

monicawoj avatar Jun 07 '22 09:06 monicawoj

Note - the most difficult piece when trying to use the JSON output from Graphviz was to parse the "pos" (position) data of the edges. This is not in normal SVG path format, so some manipulation was necessary to properly render the start, end, and control points defining the curve.

monicawoj avatar Jun 07 '22 09:06 monicawoj

+1 Great feature

syepes avatar Jul 19 '22 14:07 syepes

Still need to address self-loops (method that calls itself / edge that has the same start and end node)

monicawoj avatar Aug 17 '22 13:08 monicawoj

Should we try creating a feature flag for callgraph? So that we can merge the changes and do stability improvements incrementally, instead of waiting with this huge PR?

Maybe we can keep the option disabled by default and a simple query param in the URL can enable it?

manojVivek avatar Aug 22 '22 03:08 manojVivek

Should we try creating a feature flag for callgraph? So that we can merge the changes and do stability improvements incrementally, instead of waiting with this huge PR?

Maybe we can keep the option disabled by default and a simple query param in the URL can enable it?

Yeah I'm a fan of that idea!

monicawoj avatar Aug 22 '22 09:08 monicawoj

@manojVivek thanks for adding the feature flag commit - very cool solution! Just one thought, could we perhaps add a comment that communicates what you shared in the Discord channel regarding the use of 'enable-ui-flag' and 'disable-ui-flag'? I think it would be helpful for anyone else making use of this in the future.

Done, just posted a message with a link to the doc and the code.

manojVivek avatar Aug 25 '22 04:08 manojVivek