mirror of
https://github.com/friendica/friendica
synced 2025-04-29 17:44:24 +02:00
Dependency of callstack moved one layer up
This commit is contained in:
parent
5e6e1a8025
commit
0a7861da65
12 changed files with 39 additions and 40 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\Core;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
@ -58,8 +57,9 @@ class Profiler implements ContainerInterface
|
|||
*
|
||||
* @param int $timestamp the Timestamp
|
||||
* @param string $value A value to profile
|
||||
* @param string $callstack The callstack of the current profiling data
|
||||
*/
|
||||
public function saveTimestamp($timestamp, $value)
|
||||
public function saveTimestamp($timestamp, $value, $callstack = '')
|
||||
{
|
||||
if (!$this->enabled) {
|
||||
return;
|
||||
|
@ -75,8 +75,6 @@ class Profiler implements ContainerInterface
|
|||
$this->performance[$value] += (float) $duration;
|
||||
$this->performance['marktime'] += (float) $duration;
|
||||
|
||||
$callstack = Core\System::callstack();
|
||||
|
||||
if (!isset($this->callstack[$value][$callstack])) {
|
||||
// Prevent ugly E_NOTICE
|
||||
$this->callstack[$value][$callstack] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue