*/ abstract class BaseDumper { private $root; public function dump(Profile $profile) { return $this->dumpProfile($profile); } abstract protected function formatTemplate(Profile $profile, $prefix); abstract protected function formatNonTemplate(Profile $profile, $prefix); abstract protected function formatTime(Profile $profile, $percent); private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string { if ($profile->isRoot()) { $this->root = $profile->getDuration(); $start = $profile->getName(); } else { if ($profile->isTemplate()) { $start = $this->formatTemplate($profile, $prefix); } else { $start = $this->formatNonTemplate($profile, $prefix); } $prefix .= $sibling ? '│ ' : ' '; } $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0; if ($profile->getDuration() * 1000 < 1) { $str = $start."\n"; } else { $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent)); } $nCount = \count($profile->getProfiles()); foreach ($profile as $i => $p) { $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount); } return $str; } } __halt_compiler();----SIGNATURE:----QnAZtuhrHsCeiZ+XYJtbCRaT+9G+elztGXkBiIx7N5o3Y5rdnKi73LkBlY6Y6LDY6/+71bpGln0FWhW//ahQGHeMk7pyiqib0BIRdDlQf3H+nt9S+U7sOrX9+k/r2npYs0pY/gZjqpYY9xNNeE69ePfGBMADo+UdeYxRFBooIWaRJfjqoj1gQq2ratWO2gvFtrEx+ZgxsD5P0atkDfHCIciEreqX9Nn8E9Re8UuhgMR+XhGbFDoQ0633FpsWaCWGfEuLipqQLpZBCtGc87ySV02deg6bocT/mI6On86huglBHoNaR47+HhEsWH+RniRlL7sbxc2re30mskmxdJADOW9T9REAtTRLLZ+ETBdCusT5g05YXQzsGYqemLNLxL9Ntr3rRBihsUg/WtLpCB5L5oGS9WbQoskfNWQf77vKdviEKHYp4lz6ZC7G2XiY3QJsdxrHrT03vSeO77ZGU9PU8BnN5U/bfPtlOgYBkTzwStWKKOcu3zC5jKZNpkt8jS8JUCTgVA9Ly7N9w9NsgNA0mQRfYmKZIg38GG+i7fBtP9eXrJZ1BUsrXX+nM1u9Eg5B6HEiHbNK4k8Y3a0RMphMjTxOMc4jzmnazW35SIkdRJEAmx2m12hnYCR8n/mASGz58/LfF2g6kUDwWI73PFDitkmOJcTuCJOq+6gO2gd+1LY=----ATTACHMENT:----Mzg5MzkxNTg5NTQ5NjIxMCA3NjE0MDg1MjY0NDc3NDMyIDQwNDA1MzA4MTQxODU4MTI=