Several improvements for performance measuring

This commit is contained in:
Michael Vogel 2013-01-26 18:35:39 +01:00
commit fdee002f73
9 changed files with 87 additions and 36 deletions

View file

@ -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;
}
}
}