<?=$humour?> Posted January 6, 2005 Share Posted January 6, 2005 Hi, I was wondering any anyone out there had an experience in getting memory usage for a request. I had a look at apd and it isn't the go (CGI only, for one thing). I was hoping for something that I can start at the begining of the script and at the end run a bunch of methods that can tell me things like how much memory the server used to perform the request and where. I get the feeling that it would need a PHP extension to do this as the Zend engine doesn't expose that kind of thing. Anybody? Quote Link to comment https://forums.phpfreaks.com/topic/2116-memory-watch/ Share on other sites More sharing options...
effigy Posted January 6, 2005 Share Posted January 6, 2005 i have no idea how to capture memory specific to the script itself, but you could for the system. if you are on linux, you can capture the command output of 'free' at the start and end of your script. Quote Link to comment https://forums.phpfreaks.com/topic/2116-memory-watch/#findComment-6940 Share on other sites More sharing options...
<?=$humour?> Posted January 10, 2005 Author Share Posted January 10, 2005 REQ Move to Core PHP Hacking pls Quote Link to comment https://forums.phpfreaks.com/topic/2116-memory-watch/#findComment-6953 Share on other sites More sharing options...
toplay Posted January 10, 2005 Share Posted January 10, 2005 FYI - You maybe able to do it yourself. Check memory before and after a function, set of code, etc. Needs PHP to be compiled with the --enable-memory-limit though: http://us2.php.net/manual/en/function.memory-get-usage.php Quote Link to comment https://forums.phpfreaks.com/topic/2116-memory-watch/#findComment-6958 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.