public function XHProfRunsFile::scanXHProfDir in XHProf 7
Same name in this branch
- 7 XHProfRunsFile.inc \XHProfRunsFile::scanXHProfDir()
- 7 XHProfLib/XHProfRuns.php \XHProfRunsFile::scanXHProfDir()
Same name and namespace in other branches
- 6 XHProfRunsFile.inc \XHProfRunsFile::scanXHProfDir()
- 6 XHProfLib/XHProfRuns.php \XHProfRunsFile::scanXHProfDir()
2 calls to XHProfRunsFile::scanXHProfDir()
- XHProfRunsFile::getRuns in ./
XHProfRunsFile.inc - XHProfRunsFile::getRuns in XHProfLib/
XHProfRuns.php
File
- ./
XHProfRunsFile.inc, line 113 - Definition of XHProfRunsFile.
Class
- XHProfRunsFile
- XHProfRuns_Default is the default implementation of the iXHProfRuns interface for saving/fetching XHProf runs.
Code
public function scanXHProfDir($dir, $source = NULL) {
if (is_dir($dir)) {
$runs = array();
foreach (glob("{$dir}/*.{$source}.*") as $file) {
list($run, $source) = explode('.', basename($file));
$runs[] = array(
'run_id' => $run,
'source' => $source,
'basename' => htmlentities(basename($file)),
'date' => date("Y-m-d H:i:s", filemtime($file)),
);
}
}
return array_reverse($runs);
}