<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
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;
/**
* 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)
{
$callstack = $callstack ?: System::callstack(4, $value == 'rendering' ? 0 : 1);
if (!isset($this->performance[$value])) {
- // Prevent ugly E_NOTICE
$this->performance[$value] = 0;
}
$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;
$this->callstack['network'] = [];
$this->callstack['file'] = [];
$this->callstack['rendering'] = [];
- $this->callstack['parser'] = [];
+ $this->callstack['session'] = [];
}
/**
}
}
}
+
if (isset($this->callstack["rendering"])) {
$output .= "\nRendering:\n";
foreach ($this->callstack["rendering"] as $func => $time) {