|
|
|
@ -55,7 +55,6 @@ interface iXHProfRuns { |
|
|
|
|
public function save_run($xhprof_data, $type, $run_id = null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* XHProfRuns_Default is the default implementation of the |
|
|
|
|
* iXHProfRuns interface for saving/fetching XHProf runs. |
|
|
|
@ -145,11 +144,15 @@ class XHProfRuns_Default implements iXHProfRuns { |
|
|
|
|
return $run_id; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function list_runs_callback($a, $b) { |
|
|
|
|
return filemtime($b) - filemtime($a); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function list_runs() { |
|
|
|
|
if (is_dir($this->dir)) { |
|
|
|
|
echo "<hr/>Existing runs:\n<ul>\n"; |
|
|
|
|
$files = glob("{$this->dir}/*.{$this->suffix}"); |
|
|
|
|
usort($files, function($a, $b) {return filemtime($b) - filemtime($a);}); |
|
|
|
|
usort($files, 'list_runs_callback'); |
|
|
|
|
foreach ($files as $file) { |
|
|
|
|
list($run, $source) = explode('.', basename($file)); |
|
|
|
|
echo '<li><a href="' . htmlentities($_SERVER['SCRIPT_NAME']) |
|
|
|
|