private function Run::parseSymbols in XHProf 8
Parameters
array $data:
Return value
array
1 call to Run::parseSymbols()
- Run::__construct in src/
XHProfLib/ Run.php
File
- src/
XHProfLib/ Run.php, line 92
Class
- Run
- Provides value object for a profiler run.
Namespace
Drupal\xhprof\XHProfLibCode
private function parseSymbols($data) {
$symbols = [];
foreach ($data as $parent_child => $metrics) {
if (!isset($metrics['cpu'])) {
$metrics['cpu'] = NULL;
}
if (!isset($metrics['mu'])) {
$metrics['mu'] = NULL;
}
if (!isset($metrics['pmu'])) {
$metrics['pmu'] = NULL;
}
$symbol = new Symbol($parent_child, $metrics['ct'], $metrics['wt'], $metrics['cpu'], $metrics['mu'], $metrics['pmu']);
$symbols[$parent_child] = $symbol;
if ($symbol
->getParent() == NULL) {
$this->mainSymbol = $symbol;
}
}
return $symbols;
}