ReportEngine.php in XHProf 8
File
src/XHProfLib/Report/ReportEngine.php
View source
<?php
namespace Drupal\xhprof\XHProfLib\Report;
use Drupal\xhprof\XHProfLib\Parser\DiffParser;
use Drupal\xhprof\XHProfLib\Parser\Parser;
use Drupal\xhprof\XHProfLib\Run;
class ReportEngine {
public function getReport($url_params, $source, Run $run, $wts, $symbol, $sort = 'wt', Run $run1 = NULL, Run $run2 = NULL) {
$report = NULL;
if ($run) {
$parser = new Parser($run, $sort, $symbol);
$report = new Report($parser);
}
else {
if ($run1 && $run2) {
$report = new DiffParser($url_params, $run1
->getSymbols(), '', $run2
->getSymbols(), '', $symbol, $sort, $run1, $run2);
$report = new DiffReport($report);
}
}
return $report;
}
}