diff -r 000000000000 -r 414e01d06fd5 data/TWiki/MonitorDotPm.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/TWiki/MonitorDotPm.txt Sat Jan 26 15:50:53 2008 +0100 @@ -0,0 +1,31 @@ +---+ Package == + +%TOC% +Monitoring package. Instrument the code like this: + +use Monitor; +Monitor::MARK("Description of event"); +Monitor::MARK("Another event"); + +or, to monitor all the calls to a module + +use Monitor; +Monitor::MonitorMethod('TWiki::Users'); + +or a function + +use Monitor; +Monitor::MonitorMethod('TWiki::Users', 'getCanonicalUserID'); + +Then set the environment variable TWIKI_MONITOR to a perl true value, and +run the script from the command line e.g: +$ cd bin +$ ./view -topic Myweb/MyTestTopic + +The results will be printed to STDERR at the end of the run. Two times are +shown, a time relative to the last MARK and a time relative to the first MARK +(which is always set the first time this package is used). The final column +is total memory. + +NOTE: it uses /proc - so its linux specific... +