Lines Matching refs:profile
23 public function dump(Profile $profile): string argument
25 return $this->dumpProfile($profile);
28 abstract protected function formatTemplate(Profile $profile, $prefix): string; argument
30 abstract protected function formatNonTemplate(Profile $profile, $prefix): string; argument
32 abstract protected function formatTime(Profile $profile, $percent): string; argument
34 protected function formatRoot(Profile $profile): string argument
36 return $profile->getName();
39 private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string argument
41 if ($profile->isRoot()) {
42 $this->root = $profile->getDuration();
43 $start = $this->formatRoot($profile);
45 if ($profile->isTemplate()) {
46 $start = $this->formatTemplate($profile, $prefix);
48 $start = $this->formatNonTemplate($profile, $prefix);
53 $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0;
55 if ($profile->getDuration() * 1000 < 1) {
58 $str = \sprintf("%s %s\n", $start, $this->formatTime($profile, $percent));
61 $nCount = \count($profile->getProfiles());
62 foreach ($profile as $i => $p) {