ASNMTAP
view release on metacpan or search on metacpan
lib/ASNMTAP/Asnmtap/Plugins/WebTransact.pod view on Meta::CPAN
);
$startTime = $objectPlugins->setEndTime_and_getResponsTime ( $objectPlugins->pluginValue ('endTime') );
$returnCode = $objectWebTransact->check ( { }, custom => \&customWebTransact );
$responseTime = $objectPlugins->setEndTime_and_getResponsTime ( $startTime );
$objectPlugins->appendPerformanceData ( 'homepage='. $responseTime .'ms;'. ($trendline*1000) .';;;' );
=back
=item I<newAgent>
The first time we call $objectWebTransact->check ( { }, ... ),
is an scalar, value is 0, 1 or undef (default)
undef: current (browser) session will be used, but at the first
all a new (browser) session will automaticallybe created
0 : current (browser) session will be used
1 : new (browser) session will be created
This means that when you specify newAgent => 0 the first time you call $objectWebTransact->check, it will be treated as newAgent => 1, to ensure that an (browser) session is created.
Every time whel for a following call $objectWebTransact->check ( { }, ... ), newAgent equals 1, then a new (browser) session is created.
When newAgent equals 0, then we using the same (browser) session again.
Optional, is an scalar, value is 0 or 1
=item I<timeout>
Every time we call $objectWebTransact->check ( { }, timeout => 30, ... ),
is an scalar, value greater then 0 or undef (default)
When timeout equals undef, then we using the timeout from the parent object.
Optional, is an scalar, value is greater the 0
=item I<triesTiming>
Every time we call $objectWebTransact->check ( { }, triesTiming => '1,3,15', ... ), to get a web page and run into a possibly-temporary error (like a DNS lookup timeout), it'll wait a few seconds and retry a few times.
is an string that controls how many times it should retry, and how long the pauses should be, values greater then 0 separated by a ',' or undef (default)
When triesTiming equals undef or an empty-string, this means not to retry at all.
If you specify a string with several numbers in it (like '1,3,15'), then that means WebTransact can retry as that many times (i.e., one initial try, plus a maximum of the three retries, because three numbers there), and that it should wait first thos...
So triesTiming => '1,3,15' basically means:
try the request; return it unless it's a temporary-looking error;
sleep 1;
retry the request; return it unless it's a temporary-looking error;
sleep 3;
retry the request; return it unless it's a temporary-looking error;
sleep 15;
retry the request; return it;
=item I<triesCodes>
Is an string of HTTP codes that merit a retry (like 500 and 408, but unlike 404 or 200), values greater then 200 separated by a ',' or '408,500,502,503,504' (default).
408 Request Timeout: The client did not send a request within the required time period
500 Can't connect to ..., Connect failed, Proxy connect failed, Server Error, SSL negotiation failed, SSL read timeout or Internal Server Error: The server had some sort of internal error trying to fulfil the request. The client may see a partial p...
502 Bad Gateway: Bad Gateway: a server being used by this Web server has sent an invalid response. The response by an intermediary server was invalid. This may happen if there is a problem with the DNS routing tables.
503 Service Unavailable: Service temporarily unavailable because of currently/temporary overload or maintenance.
504 Gateway Timeout: The server did not respond back to the gateway within acceptable time period
=item I<openAppend>
Is an scalar, open debugfile as 'Writes, Appends, and Creates' mode when 1, otherwise open debugfile in 'Creates, Writes, and Truncates' mode.
=item I<cookies>
Is an scalar, value is 0 or 1 (default)
=item I<protocol>
0 = default and 1 = force 'HTTP/1.1'
Is an scalar, value is 0 or 1 (default)
=item I<keepAlive>
0 = default and 1 = 'Keep-Alive'
Is an scalar, value is 0 or 1 (default)
=item I<download_images>
get the images found by HTML::LinkExtor in the page, provided those images have not already been ed.
Is an scalar, value is 0 (default) or 1
=item I<fail_if_1>
B<fail_if_1> if set (the default) causes the check to fail when the first
web page fails. Clearing this flag is useful if you want to get a bunch of
pages and return a failure if they B<all> fail.
Is an scalar, value is 0 or 1 (default)
check semantics:
$fail_if_1 ? return $ERRORS{CRITICAL} if any URL fails
! $fail_if_1 ? return $ERRORS{CRITICAL} if all URLs fail
(same as return $ERRORS{OK} if any URL ok)
=back
I<Example:>
$objectWebTransact->check ( { } );
undef $objectWebTransact;
=item $objectWebTransact->matches()
Set and/or get matches
( run in 0.531 second using v1.01-cache-2.11-cpan-39bf76dae61 )