X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FProfiler.php;h=7e04ee563f6afe3744b6ae9116baad09f186b8e1;hb=39c2282c1292af173f854e2a4338c601f9ba58f6;hp=189a7e2e065a88c2025c5ed8dd1c146ec68de8c5;hpb=72bc1238ba2477ac39cb12e995d94d2a9821aea3;p=friendica.git diff --git a/src/Util/Profiler.php b/src/Util/Profiler.php index 189a7e2e06..7e04ee563f 100644 --- a/src/Util/Profiler.php +++ b/src/Util/Profiler.php @@ -21,8 +21,8 @@ namespace Friendica\Util; -use Friendica\Core\Config\Cache; -use Friendica\Core\Config\IConfig; +use Friendica\Core\Config\ValueObject\Cache; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\System; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; @@ -69,16 +69,16 @@ class Profiler implements ContainerInterface /** * Updates the enabling of the current profiler * - * @param IConfig $config + * @param IManageConfigValues $config */ - public function update(IConfig $config) + public function update(IManageConfigValues $config) { $this->enabled = $config->get('system', 'profiler'); $this->rendertime = $config->get('rendertime', 'callstack'); } /** - * @param Cache $configCache The configuration cache + * @param \Friendica\Core\Config\ValueObject\Cache $configCache The configuration cache */ public function __construct(Cache $configCache) { @@ -126,7 +126,6 @@ class Profiler implements ContainerInterface $callstack = $callstack ?: System::callstack(4, $value == 'rendering' ? 0 : 1); if (!isset($this->performance[$value])) { - // Prevent ugly E_NOTICE $this->performance[$value] = 0; } @@ -199,7 +198,7 @@ class Profiler implements ContainerInterface $this->performance['network'] = 0; $this->performance['file'] = 0; $this->performance['rendering'] = 0; - $this->performance['parser'] = 0; + $this->performance['session'] = 0; $this->performance['marktime'] = 0; $this->performance['marktime'] = microtime(true); $this->performance['classcreate'] = 0; @@ -221,7 +220,7 @@ class Profiler implements ContainerInterface $this->callstack['network'] = []; $this->callstack['file'] = []; $this->callstack['rendering'] = []; - $this->callstack['parser'] = []; + $this->callstack['session'] = []; } /** @@ -283,6 +282,7 @@ class Profiler implements ContainerInterface } } } + if (isset($this->callstack["rendering"])) { $output .= "\nRendering:\n"; foreach ($this->callstack["rendering"] as $func => $time) {