How many vUsers ran in a test?

Recently a colleague of mine working at a major UK bank was asked to find out ways that the number of vUsers in a test could be recorded so that the cost of LoadRunner licences could be charged back to the project or department who requested a particular test. I had a quick look arounf the LoadRunner results set and found a file containing information which can be used to calculate this.

In the results folder there is a sub-folder called “Data”. This contains a file called vurun.txt.
The file contains information about the vUser profile for a test.

A sample file looks like this…..

1296043739         0              1296043742

1296043742         1              1296043745

1296043745         2              1296043748

1296043748         4              1296043751

1296043751         2              1296043753

1296043753         1              1296043756

1296043756         0              1296043759

 

The first number in each row is the epoch time (in seconds).
The second number in each row is the number of running vUsers.
The third number in each row is also epoch time.

Each row basically contains 3-seconds-worth of information. (I presume that this is the default sampling interval).

In the example above (which I’ve made up), the test started and no users ran in the first 3 seconds. The vUser count was 1 in the next 3-second period, 2 in the one after that etc. You could either calculate an average from the middle column to charge per vUser or pull out the largest number and charge based on that.

The contents of this file can be pasted into an Excel spreadsheet and the “text to columns” option can be used to split the information in the file into three columns.
The LoadRunner AVERAGE and MAX functions can be used to return the average or maximum number of running users.

You can use tools such ashttp://www.epochconverter.com/ or http://bish.co.uk/epoch.htm to convert the epoch times in the file to the Gregorian calendar.

Author: Richard Bishop

http://about.me/richard_bishop