Archive for April, 2006
Transaction Duration
Written by meena on April 19, 2006 – 12:43 pmLR Example: lr_get_transaction_duration
In the following example, the lr_get_transaction_duration function checks the duration of part of a transaction, and sends it to the Output window.
double trans_time;
int status;
lr_start_transaction (”Flight”);
web_url(”home;sz=234×60;tile=1;ord=977672495775323400″,
”URL=http://ad.doubleclick.net/…ord=977672495775323400″,
..
”Mode=URL”,
LAST);
// Get transaction time to this point
trans_time=lr_get_transaction_duration(”Flight”);
status = web_submit_data(”flight”,
“Action=http://www.mercury-tours.com/cgi-bin/tours?ITN_RESPONSE+”,
“Method=POST”,
“TargetFrame=”,
…
LAST);
/* End transaction with operation result - pass or fail */
if (status == 0)
lr_end_transaction(”Flight”, LR_PASS);
else
lr_end_transaction(”Flight”, LR_FAIL);
if (trans_time)
lr_output_message(”The duration up to the submit is %f seconds”, trans_time);
else
lr_output_message(”The duration cannot be determined.”);
Posted in Performance Testing | No Comments »
Using Timer in LoadRunner
Written by meena on April 19, 2006 – 12:38 pmUsing Timer in Loadrunner
In the following segment, lr_start_timer and lr_end_timer are used to calculate the time spent on checks. This is then subtracted from the time spent on transaction “sampleTrans” with lr_wasted_time.
double time_elapsed, duration, waste;
merc_timer_handle_t timer;
lr_start_transaction(”sampleTrans”);
web_url(”index.htm”,
”URL=http://localhost/index.htm”,
”TargetFrame=”,
”Resource=0″,
”RecContentType=text/html”,
”Referer=”,
”Snapshot=t1.inf”,
”Mode=HTML”,
LAST);
timer = lr_start_timer();
/* Do some checks the duration of which
is not to be included in the transaction. */
web_image_check(”ImgCheck1″,
”src=index_files/image002.jpg”,
LAST);
web_image_check(”ImgCheck2″,
”src=index_files/planets.gif”,
LAST);
// How long did the tests take in seconds.
time_elapsed = lr_end_timer(timer);
// Convert to millisecond.s
waste = time_elapsed * 1000;
/* Remove the time the checks took from
the transaction. */
lr_wasted_time(waste);
lr_end_transaction(”sampleTrans”, LR_AUTO);
Posted in Performance Testing | No Comments »
Load Testing and ViewState!
Written by meena on April 19, 2006 – 9:03 amLoadRunner and ViewState???
This is an interesting idea I’d like to look into – ViewState.
Posted in Performance Testing | No Comments »