Comparing those timestamps, it used 60 seconds of CPU in 2 hours, which
is 0.08% CPU usage.
I just checked, and one of my scripts has been running 7 days, and so
far has used "208:59" (CPU time, mins:secs). It is using 46MB of memory
apparently, and seems quite constant at 1.9% CPU usage. (IIRC that is
1.9% of one core.) It collected 1.4 million tweets in that time.
So your numbers seem about right.
I'm not explicitly calling set_time_limit() (and phirehose does not
either) but the manual (
http://jp.php.net/manual/en/info.configuration.php#ini.max-execution-time )
says max_execution defaults to 0 from the commandline, and "php -i |grep
execution" does indeed tell me zero.
> Is it a bad idea to use "set_time_limit(0)"
I think not, but if your code has any potential for an infinite loop you
may want to rethink that (*). E.g. one idea would be to call
set_time_limit(20) in your statusUpdate() function (which is called
every minute).
Darren
*: Also remember your phirehose script should be doing as little work as
possible, little more than saving the tweets somewhere, so as not to
hold up the streaming socket.
--
Darren Cook, Software Researcher/Developer
http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)
(typo, sorry!) 0.8%
Darren