Open vainaixr opened 5 years ago
The colored boxes are a rough indication of both the time spent on the method, and the number of times that method was called. The script uses a formula to calculate a (hue, saturation, value) code that is transformed to rgb.
Broadly, the scale goes from gray/light blue -> purple -> pink based on how much time that method took as a fraction of the entire time.
You can see this calculation in the output.py code:
def node_color(self, node):
value = float(node.time.fraction * 2 + node.calls.fraction) / 3
return Color.hsv(value / 2 + .5, value, 0.9)
def edge_color(self, edge):
value = float(edge.time.fraction * 2 + edge.calls.fraction) / 3
return Color.hsv(value / 2 + .5, value, 0.7)
what is the meaning of different colored boxes, and what is the difference between them?