mirror of
https://github.com/friendica/friendica
synced 2025-05-04 09:04:11 +02:00
Improved performance profiler
This commit is contained in:
parent
9c0342b907
commit
5fb83d0632
5 changed files with 33 additions and 7 deletions
|
@ -134,7 +134,7 @@ class Profiler implements ContainerInterface
|
|||
public function resetPerformance()
|
||||
{
|
||||
$this->performance = [];
|
||||
$this->performance['start'] = microtime(true);
|
||||
$this->performance['start'] = $this->performance['ready'] = microtime(true);
|
||||
$this->performance['database'] = 0;
|
||||
$this->performance['database_write'] = 0;
|
||||
$this->performance['cache'] = 0;
|
||||
|
@ -145,6 +145,9 @@ class Profiler implements ContainerInterface
|
|||
$this->performance['parser'] = 0;
|
||||
$this->performance['marktime'] = 0;
|
||||
$this->performance['marktime'] = microtime(true);
|
||||
$this->performance['frontend'] = 0;
|
||||
$this->performance['init'] = 0;
|
||||
$this->performance['content'] = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -277,6 +280,11 @@ class Profiler implements ContainerInterface
|
|||
}
|
||||
}
|
||||
|
||||
public function set($timestamp, $id)
|
||||
{
|
||||
$this->performance[$id] = $timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the container can return an entry for the given identifier.
|
||||
* Returns false otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue