Tuesday, August 27, 2013

How to change the 90th percentile column in the summary report of Loadrunner Analysis to get customized report with some other percentile values?

Loadrunner always shows the transaction summary table with 90th percentile of transaction response time values as shown in below image. 

Suppose, I want to prepare a customized report showing 50th percentile for the transaction response time values.
To change the percentile value go to properties window and click on percentile value as shown below.
Click here to know more

Analysis summary filter window will open.

Now change the transaction percentile value from 90 to 50.

Click ok. Loadrunner analysis will show a message box displaying Applying summary filter.

 And the transaction summary table will change to below.

Bingo!!! You did it.

What is the 90th percentile and how to calculate 90th percentile?

Before explaining the 90th percentile let’s see what is percentile. A percentile is a measure used in statistics indicating the value below which a given percentage of observations in a group of observations fall.

For example the 30th percentile is the value below which 30 percent of the observations may be found.

In similar way the 90th percentile is the value below which 90 percent of the observations may be found.

How to calculated 90th percentile?
Click here to know more

As we know it is the value from which 90% of the samples are smaller so let’s find the 90th percentile in simple easy steps.
Step 1: Sort the values in increasing order.
Step 2: Eliminate the top 10% values.
Step 3: The highest value you are left with is the 90th percentile.


Suppose we have following sample of data: 1, 5, 3, 9, 4, 7, 7, 9, 11, and 21.

Sorting the data in ascending order gives: 1, 3, 4, 5, 7, 7, 9, 11 and 21.

After removing top 10% values (10% of 10 = 1) we have 1, 3, 4, 5, 7, 7, 9 and 11.

The 90th percentile is 11.

What is the significance of 90th percentile?

It answers the following questions:
1. What percentage of transactions have a response time less than or equal to X seconds?
2. What is the time under which 90 percent of the transactions are responding?

Loadrunner Analysis parsing error, unable to analyse results and generate analysis report.

When we run a test for longer duration of time the number of samples in the result set will also be more.  The total number of samples generated can easily be calculated using the below formula:
Number of Samples = Total Duration of Run / Frequency sampling

Suppose, we want to calculate total samples for a test run for 1 hour and frequency of sampling is 10 seconds. Using the formula we have
Number of samples = 1 hour/ 10 seconds = 60*60 seconds/10 seconds = 360 samples.

Now these samples contribute to the size of result set, so more number of samples will make a very big result set and this creates issues (sometimes).
While analysing the big result set the Analysis throws below error.

Getting Parsing error with large result sets (less than 2 GB).: Parse Command line error: Unable to cast COM object of type ‘System._ComObject’ to interface type ‘Borland.Vcl.Fields’. This operation failed because the QueryInterface call on the COM component with IID ‘{XXXXXXXXXXXX}’ failed due to the following error: No such interface supported. (Exception from HRESULT XXXXXXXXX (E_NOINTERFACE)).

Click here to know more

This issue is resolved by changing the Data Source setting in the Result Collection tab of LR Analysis. 
Go to Tools > Options > Result Collection tab
The default value is Generate Complete data only and we need to change this to Display Summary while generating complete data as shown in the below image.

Stay Tuned for more Analysis stuff!!! Happy Learning and Loadrunning!!!

Thursday, August 15, 2013

What is pacing time and why to use pacing time?

Pacing time is used to control the pace of the users in load test. This helps us to accurately achieve desired load against application under test. Pacing is the wait time between the action iterations.

The pacing is set in run time setting as shown below.

We have following options for pacing:

1. As soon as the previous iteration ends: Loadrunner starts the next iteration as soon as possible after the previous iteration ends.

2. After the previous iteration ends: In this Loadrunner starts each new iteration after a specified amount of time, the end of the previous iteration. We can either give an exact number of seconds or a range of time.

3. At <fixed/random>intervals: In this we can specify the time between iteration either a fixed number of seconds or a range of seconds from the beginning of the previous iteration. The next scheduled iteration will only begin when the previous iteration is complete.

Why to use pacing time?
Click here to know more

Pacing time is used to control the transactions passed during the test and the hits on Application under test.

I will explain How to calculate the pacing time and think time? In my next post so stay tuned. Happy Learning!!!

Wednesday, August 7, 2013

What is Load Balancing? How Load balancing helps in improved performance?

Load balancing is mainly to distribute the workload across multiple computers or a computer cluster, CPUs, disk drives, or other system resources.

This optimizes resource use, maximizes throughput, minimizes response time, and avoids overload. Using multiple components with load balancing instead of a single component may increase reliability through redundancy. Load balancing is usually provided by dedicated software or hardware, such as a multilayer switch or a Domain Name System server Process.

Why to do Load Balancing?
Click here to know more

From the first glance it looks like an overhead but it is not; actually this helps us to improve performance.

1.      Load balancing increases scalability to accommodate higher volume work by distributing (balancing) client requests among several servers. This allows more servers (hosts) to be added to handle additional load.

2.      Load balancing ensures uninterrupted continuous availability of critical and key business applications. When the applications are on more than one machine, operations personnel can work on one machine while the other is busy working.

3.    It helps the system to be ready to accept and handle growth and make it fault resilience, so if a server crashes or just needs maintenance work done, an alternative server can take over.


There are various algorithms for load balancing and it totally depends on the context which one you want to use. Some of them are listed below:

1.    Round robin: This distributes the request to different servers in a round robin manner independent of the load on each server. The problem with this type is it works blindly and even if server is overloaded it will queue the request.

2.    Denoted Connections: This algorithm keeps track of the number of active connections to each server and always sends new request to server with least number of connections. If two servers have same number of connections, it selects the server with lowest server identifier. The disadvantage with this is when system is empty the same server is used all the time.

3.    Round Trip: This algorithm monitors the first buffer time for each connections of the servers. The mean time is calculated over a averaging window and the average value is reset at the end of averaging window. The server with least mean value will get the request. This is complex and can be implemented with limited set of variables.

4.    Transmit Byte: This algorithm keeps track of the amount of transmitted bytes from each web server since the last averaging reset and uses this to allocate the request to the server.

Tuesday, August 6, 2013

How to encode a string as if a password in Loadrunner?

There are many ways to encode a string in Loadrunner. I already have explained the one using password encoder tool. Below is another way to encode the string but this will convert the plain string to URL format. 

Let’s see how, in this I have defined a function EncodePlainToURL() which accepts a string and encodes it to URL format.

char *EncodePlainToURL(const char *sIn, char *sOut)
                    int i;
                    char cCurChar;
                    char sCurStr[4] = {0};

                     sOut[0] = '\0';
                     for (i = 0; cCurChar = sIn[i]; i++)
                            if (isdigit(cCurChar) || isalpha(cCurChar))
                                     sprintf(sCurStr, "%X", cCurChar);


                                                                                                                                                                                      sprintf(sCurStr, "%%%X", cCurChar)

                               strcat(sOut, sCurStr);

                    return sOut;


                char sOut[100];
                char sIn[] = "password";
                lr_output_message("the encoded output is %s", EncodePlainToURL(sIn, sOut));
Click here to know more

                return 0;

Hope you will try this at home ;) . Thanks for reading :) 

Can we use Load generators on Virtual machines?

Well of course we can, if it is just for the sake of using but this will alter the response time of the tests.

HP never recommends using VM’s and the HP guide states that the VMware's clock does not synchronize with the hardware clock. This causes inaccuracy in the response time obtained.

This implies that load test results are not showing the actual performance of the application as opposed to what it would be in the real world.

What is VM Clock drift?
Click here to know more

The term Clock drift describes situations where the reported time diverges from the correct time at an approximately constant rate.

There are two main reasons for this:
  •  Time in a virtual machine drifts because the hardware time source used by the virtual machine monitor drifts
  •  Time in a virtual machine drifts at a constant rate

The system clock in VM’s is also virtualized and occasionally has to re synchronize with the physical system clock. This system clock is tied to your virtual user timing directly and the amount of drift is unpredictable and ungovernable.