Several improvements for performance measuring
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user