KapTinKiRk
November 15th, 2000, 20:36
Some scripts use a lot of system resources, some don't. Is there a way to test a script and see how much resources it uses? It it simply the bandwith, or is it a whole other thing in itself.
![]() This is our archive, please go to the main forum page for the latest discussions and news about free web hosting. |
||||
resource usageKapTinKiRk November 15th, 2000, 20:36 Some scripts use a lot of system resources, some don't. Is there a way to test a script and see how much resources it uses? It it simply the bandwith, or is it a whole other thing in itself. atlas November 16th, 2000, 00:37 Originally posted by KapTinKiRk Some scripts use a lot of system resources, some don't. Is there a way to test a script and see how much resources it uses? It it simply the bandwith, or is it a whole other thing in itself. Usually system resources refers to the memory and CPU a process takes up. Run the script, and if you have shell access run 'top' and see how much your script or program uses. mjk@atlascgi.com KapTinKiRk November 16th, 2000, 00:48 hhmm, how do I read this thing, theres numbers all over the place :( Grant November 16th, 2000, 01:29 Originally posted by KapTinKiRk Some scripts use a lot of system resources, some don't. Is there a way to test a script and see how much resources it uses? It it simply the bandwith, or is it a whole other thing in itself. The shell script 'top' is probably more accurate, but you can also use the perl Benchmark module. It is mainly used for testing a block of code. You use it like this: use Benchmark; $t0 = new Benchmark; # code you want to test $t1 = new Benchmark; print "<p>Processing Time: " . timestr(timediff($t1, $t0)) . "\n"; Grant | ||||
Copyright © 1996-2008 Per Olof Sandholm. All rights reserved. Privacy Statement |
||||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum