Callgraph visualization
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
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.
+1 Great feature
Still need to address self-loops (method that calls itself / edge that has the same start and end node)
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?
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
disabledby default and a simple query param in the URL can enable it?
Yeah I'm a fan of that idea!
@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.