Anyone have an example of checking for leaks in their test suite? Few days ago had some nice 1.6GB Apache processes and thought we had a leak. Turned out we had a query that was trying to suck too much out of the database and it was just doing what it was told, but I still want to add some general testing for leaks.
I've used CatalystX::LeakChecker in the past but not sure how to incorporate that into a .t file. What I initially did was use Linux::Smaps (although /proc/self/statm would likely do as well) and then in a test ran a request a few times, measured memory and then ran it 1000 times and looked for a differences in memory usage. I'm finding that not very reliable as tests pass on one machine and then on another fails -- maybe due to how and when the heap just happens to get allocated. -- Bill Moseley [email protected]
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
