public function getBlocksAsTree()
    {
        $blocks = $this->getRequestInfo()->getBlocks();
        $tree = new Varien_Data_Tree();
        $rootNodes = array();

        foreach ($blocks as $block) {
            $parentNode = $tree->getNodeById($block->getParentName());

            $node = new Varien_Data_Tree_Node(array(
                'name'     => $block->getName(),
                'class'    => $block->getClass(),
                'template' => $block->getTemplateFile(),
                'duration' => $block->getRenderedDuration(),
                'count' => $block->getRenderedCount()
            ), 'name', $tree, $parentNode);

            $tree->addNode($node, $parentNode);

            if (!$parentNode) {
                $rootNodes[] = $node;
            }
        }

        return $rootNodes;
    }