Measuring CGI resource usage
Simon Smith
hello at simonsmith.co
Thu May 15 02:32:53 EDT 2014
Hi Richard
Not sure if this would work - creating a daemon from a shell script and
using the ps (or top) command to monitor and output everything for the
livecode cgi process to text file, that you can then examine.
- Simon
On Wed, May 14, 2014 at 5:54 PM, Richard Gaskin
<ambassador at fourthworld.com>wrote:
> CGI is an uncommonly harsh environment, with the entire runtime life cycle
> happening in the time it takes to satisfy an HTTP request. So I tend to
> take great care in measuring both CPU time and memory with CGI scripts, but
> I've found it difficult to get accurate measurements in the server
> environment.
>
> One commonly-recommended method is to use the "time" program, with the
> --verbose option to include memory:
>
> /usr/bin/time --verbose ./livecode-server somescriptfile.lc
>
> It seems on many systems that time program is implemented in an incomplete
> way, showing artificially low values for memory usage.
>
> top might seem a good option, but in practice it's useless since even its
> tightest update frequency is less than the execution time of my scripts.
>
> Any suggestions for something like /usr/bin/time but is actually reliable,
> something I can attach to the command line call for an accurate measurement
> of both time and memory?
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at FourthWorld.com http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list