One of the greatest features of the Blackfire profiler is the ability to display a call graph that represents the consumed resource changes (A and B) between two profiles to make it easy to find gains and losses.
The graph is a superposition of all calls from the two original graphs.
When the path between two shared nodes are different, the nodes for profile A path are displayed on the left side of the graph and on the right side for profile B (each side can be empty).
The background color and the number are not relevant.
Performance changes only make sense for shared nodes; calculating the gain or loss between two shared nodes is as simple as subtracting their numbers.
When a portion of the graph is different for profile A and B, the performance gain or lose can be calculated by subtracting the number of the first shared node before the split and the first shared node after the split.
Let's take some examples:
On this graph, the code from the B profile is faster than the code from the A
profile as the
main() node displays a
On this graph, there is a function call that is only present on profile A. The
performance improvement of this call removal is
-253ms - -162ms).