Документ взят из кэша поисковой машины. Адрес оригинального документа : http://dualopt1.cmm.msu.ru/bin/rdiff/TWiki/MonitorDotPm?type=last
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 20:55:25 2014
Кодировка:
%TOPICTITLE% ( vs. 1) - TWiki
Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...
View   r1
MonitorDotPm 1 - 2008-01-22 - Main.TWikiContributor
Line: 1 to 1
Added:
>
>

Package =

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...


Revision 1r1 - 2008-01-22 - 03:21:30 - TWikiContributor
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.MonitorDotPm
Syndicate this site RSSATOM