extensions/treemap_reporter/treemap_recorder.php
public function compareChildren($a, $b)
    {
        if ($this->_children[$a]->getTotalSize() > $this->_children[$b]->getTotalSize()) {
            $node_a              = $this->_children[$a];
            $node_b              = $this->_children[$b];
            $this->_children[$a] = $node_b;
            $this->_children[$b] = $node_a;
        }
    }
public function compareChildren($a, $b)
    {
        if ($this->_children[$a]->getTotalSize() > $this->_children[$b]->getTotalSize()) {
            $node_a              = $this->_children[$a];
            $node_b              = $this->_children[$b];
            $this->_children[$a] = $node_b;
            $this->_children[$b] = $node_a;
        }
    }
Comparator method to rank child nodes by total weight.