XHProfRuns_Default::getHardHit PHP Method

getHardHit() public method

Obtains the pages that have been the hardest hit over the past N days, utalizing the getRuns() method.
public getHardHit ( array $criteria ) : resource
$criteria array An associative array containing, at minimum, type, days, and limit
return resource The result set reprsenting the results of the query
    public function getHardHit($criteria)
    {
        //call thing to get runs
        $criteria['select'] = "distinct(`{$criteria['type']}`), count(`{$criteria['type']}`) AS `count` , sum(`wt`) as total_wall, avg(`wt`) as avg_wall";
        unset($criteria['type']);
        $criteria['where'] = $this->db->dateSub($criteria['days']) . " <= `timestamp`";
        unset($criteria['days']);
        $criteria['group by'] = "url";
        $criteria['order by'] = "count";
        $resultSet = $this->getRuns($criteria);
        return $resultSet;
    }