]> git.mxchange.org Git - friendica.git/blobdiff - include/poller.php
Merge pull request #3178 from eelcomaljaars/sql_mode_doc_update
[friendica.git] / include / poller.php
index c0b92bb8117d995238b71d484d3c2077b50b8e2d..e8bfb88389aebcb08355d5792df373f89b6a9d07 100644 (file)
@@ -166,6 +166,7 @@ function poller_execute($queue) {
  *
  * @param array $queue Workerqueue entry
  * @param string $funcname name of the function
+ * @param array $argv Array of values to be passed to the function
  */
 function poller_exec_function($queue, $funcname, $argv) {
 
@@ -179,6 +180,8 @@ function poller_exec_function($queue, $funcname, $argv) {
 
        $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;
@@ -205,6 +208,7 @@ function poller_exec_function($queue, $funcname, $argv) {
 
        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"];