Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meaning of different colored boxes #13

Open
vainaixr opened this issue Aug 20, 2019 · 1 comment
Open

meaning of different colored boxes #13

vainaixr opened this issue Aug 20, 2019 · 1 comment

Comments

@vainaixr
Copy link

what is the meaning of different colored boxes, and what is the difference between them?

@daneads
Copy link
Owner

daneads commented Aug 26, 2019

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants