summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-08-19 10:32:01 +0400
committerAndrew Dolgov <[email protected]>2014-08-19 10:32:01 +0400
commit2d9c5684394f54e62393b3b2c1b40f242fb1793a (patch)
tree08f9d1b331b9d73c6790a9ec77cf4c726dccf498 /include
parentd5e490952aae542520b6dcaf9a9297f3b8199dfc (diff)
add some timing information to update_daemon_common
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index d6e5a5443..4f783b7af 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -169,6 +169,7 @@
}
$nf = 0;
+ $bstarted = microtime(true);
// For each feed, we call the feed update function.
foreach ($feeds_to_update as $feed) {
@@ -196,13 +197,22 @@
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.