jiffyclub/snakeviz — pull request #40 by tonysyu (2014-11-09 00:20:43+00:00)
Title: Refactor graph code

Sorry, this is a bit of a code dump, but I tend to refactor code when I'm trying to understand it. I completely understand if this is too massive a change for merging.

Note that `PStatRow` is renamed to `PStatsNode`, while `PStatGroup` and `PStatLocation` are removed. The latter was unused and the group was only used temporarily to package multiple `PStatRow`s, but only the first is ever used.

Other changes:
- Add user-specified tree-depth for upload. This is a work around for issue #12.
- Tests! And Travis CI
- I've added a comment about some weird loop-back behavior in `stats_to_tree_dict`. Basically, when the size of child calls doesn't add up to the parent size, the parent is linked to itself. I don't understand what this is trying to accomplish, but I didn't want to remove it (since I didn't understand it).