https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106386
Revision: 106386
Author: reedy
Date: 2011-12-15 22:22:28 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
Time logging, and another \n
Modified Paths:
--------------
trunk/tools/rotatebot/rotbot.php
trunk/tools/rotatebot/upload.php
Modified: trunk/tools/rotatebot/rotbot.php
===================================================================
--- trunk/tools/rotatebot/rotbot.php 2011-12-15 22:15:33 UTC (rev 106385)
+++ trunk/tools/rotatebot/rotbot.php 2011-12-15 22:22:28 UTC (rev 106386)
@@ -773,7 +773,7 @@
}
mysql_close($myslink); // TODO should/can this be moved to function suicide? -
Probably not due to line 33.
-suicide ("Bot finished.");
+suicide ("Bot finished.\n");
// END script
Modified: trunk/tools/rotatebot/upload.php
===================================================================
--- trunk/tools/rotatebot/upload.php 2011-12-15 22:15:33 UTC (rev 106385)
+++ trunk/tools/rotatebot/upload.php 2011-12-15 22:22:28 UTC (rev 106386)
@@ -118,8 +118,11 @@
}
$dc += strlen($bo)+3;
fputs($fp, "Content-length: $dc \n");
+ logfile( "Content-length: $dc" );
fputs($fp, "\n");
+ $startTime = time();
+
foreach($data_l as $key=>$val)
{
if ($key == "file.file")
@@ -142,6 +145,9 @@
$res .= fread($fp, 1);
}
fclose($fp);
+ $endTime = time();
+ $diff = $endTime - $startTime;
+ logfile( "Time taken: " . intval($diff) . " seconds" );
global $homedir;
file_put_contents( $homedir . "cache/log.txt",$res);
return $res;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs