Makes save_timestamp conditional

- Add a .htconfig check to save_timestamp to prevent systematic
profiling
- Removes unused `mark_timestamp()` function including deleted code
comment
This commit is contained in:
Hypolite Petovan 2016-10-21 22:50:58 -04:00
parent a5923bdd4f
commit 74ce4c2710
2 changed files with 3 additions and 6 deletions

View File

@ -1100,6 +1100,9 @@ class App {
}
function save_timestamp($stamp, $value) {
if (!isset($a->config['system']['profiler']) || !$a->config['system']['profiler'])
return;
$duration = (float)(microtime(true)-$stamp);
if (!isset($this->performance[$value])) {
@ -1176,11 +1179,6 @@ class App {
return implode(", ", $callstack);
}
function mark_timestamp($mark) {
//$this->performance["markstart"] -= microtime(true) - $this->performance["marktime"];
$this->performance["markstart"] = microtime(true) - $this->performance["markstart"] - $this->performance["marktime"];
}
function get_useragent() {
return(FRIENDICA_PLATFORM." '".FRIENDICA_CODENAME."' ".FRIENDICA_VERSION."-".DB_UPDATE_VERSION."; ".$this->get_baseurl());
}

View File

@ -145,7 +145,6 @@ class Conversation extends BaseObject {
$result[] = $item_data;
}
//$a->mark_timestamp();
return $result;
}