]> git.wh0rd.org - tt-rss.git/commitdiff
add some timing information to update_daemon_common
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 19 Aug 2014 06:32:01 +0000 (10:32 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 19 Aug 2014 06:32:01 +0000 (10:32 +0400)
include/rssfuncs.php

index d6e5a54436725e1352bc80f4ffee23efc637af1b..4f783b7af0219c76b3a8cb7dc3d3e3fc4457bdbd 100644 (file)
                }
 
                $nf = 0;
+               $bstarted = microtime(true);
 
                // For each feed, we call the feed update function.
                foreach ($feeds_to_update as $feed) {
                                while ($tline = db_fetch_assoc($tmp_result)) {
                                        if($debug) _debug(" => " . $tline["last_updated"] . ", " . $tline["id"] . " " . $tline["owner_uid"]);
 
+                                       $fstarted = microtime(true);
                                        $rss = update_rss_feed($tline["id"], true, false);
                                        _debug_suppress(false);
+
+                                       _debug(sprintf("    %.4f (sec)", microtime(true) - $fstarted));
+
                                        ++$nf;
                                }
                        }
                }
 
+               if ($nf > 0) {
+                       _debug(sprintf("Processed %d feeds in %.4f (sec), %.4f (sec/feed avg)", $nf,
+                               microtime(true) - $bstarted, (microtime(true) - $bstarted) / $nf));
+               }
+
                require_once "digest.php";
 
                // Send feed digests by email if needed.