Several improvements for performance measuring
This commit is contained in:
parent
2c93067682
commit
fdee002f73
9 changed files with 87 additions and 36 deletions
7
boot.php
7
boot.php
|
@ -417,6 +417,7 @@ if(! class_exists('App')) {
|
|||
$this->performance["database"] = 0;
|
||||
$this->performance["network"] = 0;
|
||||
$this->performance["rendering"] = 0;
|
||||
$this->performance["parser"] = 0;
|
||||
|
||||
$this->config = array();
|
||||
$this->page = array();
|
||||
|
@ -725,6 +726,12 @@ if(! class_exists('App')) {
|
|||
return $this->rdelim[$engine];
|
||||
}
|
||||
|
||||
function save_timestamp($stamp1, $value) {
|
||||
$stamp2 = microtime(true);
|
||||
$duration = (float)($stamp2-$stamp1);
|
||||
$this->performance[$value] += (float)$duration;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue