1 # <a name="Package <code>="></a> Package =
5 <li><a href="#Package =="> Package ==</a></li>
9 Monitoring package. Instrument the code like this:
11 use Monitor; Monitor::MARK("Description of event"); Monitor::MARK("Another event");
13 or, to monitor all the calls to a module
15 use Monitor; Monitor::MonitorMethod('TWiki::Users');
19 use Monitor; Monitor::MonitorMethod('TWiki::Users', 'getCanonicalUserID');
21 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
23 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.
25 NOTE: it uses /proc - so its linux specific...