WWW::Mechanize::Timed - Time Mechanize requests
use WWW::Mechanize::Timed; my $ua = WWW::Mechanize::Timed->new(); $ua->get($url); print "Total time: " . $ua->client_total_time . "\n"; print "Elapsed time: " . $ua->client_elapsed_time . "\n";
This module is a subclass of WWW::Mechanize that times each stage of the HTTP request. These can then be used in monitoring systems.
The constructor is provided by WWW::Mechnize. See that module's documentation for details.
The vast majority of methods are provided by WWW::Mechanize. See that module's documentation for details. Additional methods provided by this module follow. The most useful method is client_response_receive_time, or how long it took to get the data from the webserver once the response was made (and gives an idea of how loaded the webserver was). All times are in seconds.
The time it took to connect to the remote server.
The time it took to transmit the request.
Time it took to respond to the request.
Time it took to get the data back.
Total time taken for each of the 4 stages above.
Total time taken to make the WWW::Mechanize::get request, as perceived by the calling program.
Use this method to request a page:
$ua->get($url);
Andy Lester for WWW::Mechanize. Simon Wistow for LWPx::TimedHTTP.
This module is copyright Fotango Ltd 2004. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.000 or, at your option, any later version of Perl 5 you may have available.
The full text of the licences can be found in the Artistic and COPYING files included with this module, or in perlartistic and perlgpl as supplied with Perl 5.8.1 and later.
Leon Brocard <acme@astray.com>.
WWW::Mechanize.
To install WWW::Mechanize::Timed, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Timed
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Timed
For more information on module installation, please visit the detailed CPAN module installation guide.