return $return;
}
+ /**
+ * @brief Analyze a database query and log this if some conditions are met.
+ *
+ * @param string $query The database query that will be analyzed
+ */
public function log_index($query) {
$a = get_app();
$stamp = (float)microtime(true);
+ // We use the callstack here to analyze the performance of executed worker entries.
+ // For this reason the variables have to be initialized.
if (Config::get("system", "profiler")) {
$a->performance["start"] = microtime(true);
$a->performance["database"] = 0;
logger("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - done in ".$duration." seconds.");
+ // Write down the performance values into the log
if (Config::get("system", "profiler")) {
$duration = microtime(true)-$a->performance["start"];