Symbol.php in XHProf 8
File
src/XHProfLib/Symbol/Symbol.php
View source
<?php
namespace Drupal\xhprof\XHProfLib\Symbol;
class Symbol {
private $parent;
private $child;
private $ct;
private $wt;
private $cpu;
private $mu;
private $pmu;
public function __construct($parent_child, $ct, $wt, $cpu = NULL, $mu = NULL, $pmu = NULL) {
$this->ct = $ct;
$this->wt = $wt;
$this->cpu = $cpu;
$this->mu = $mu;
$this->pmu = $pmu;
list($this->parent, $this->child) = $this
->parseParentChild($parent_child);
}
public function getParent() {
return $this->parent;
}
public function getChild() {
return $this->child;
}
public function getCpu() {
return $this->cpu;
}
public function getCt() {
return $this->ct;
}
public function getMu() {
return $this->mu;
}
public function getPmu() {
return $this->pmu;
}
public function getWt() {
return $this->wt;
}
public function getMetric($metric) {
if (isset($this->{$metric})) {
return $this->{$metric};
}
else {
return NULL;
}
}
private function parseParentChild($parent_child) {
$ret = explode("==>", $parent_child);
if (isset($ret[1])) {
return $ret;
}
return [
NULL,
$ret[0],
];
}
}
Classes
Name |
Description |
Symbol |
Provides a value object for single span of profiling. |