Wasted Time

Wasted time is time spent on activities whose purpose is to support test analysis, but would never be performed by a browser user, for example, time spent keeping transaction statistics for later reporting. Wasted time is calculated internally. Your script can also add wasted time with lr.wastedTime.

Sometimes, you may enter activities in a script that your do not want reported as part of the transaction statistics. Generally, these are activities related to record keeping, logging, or custom analysis. If you enhance the script with steps whose durations should not be included in the test statistics, you can track the time used by these steps with lr.startTimer and lr.endTimer. Then, the function lr.wastedTime is used for adding this user-determined time to the internally generated wasted time.

You can retrieve the total wasted time (both that generated by automatically and that added with lr.wastedTime) with the function lr.getTransactionWastedTime.

When VuGen creates the log file, output.txt, and when on-line testing generates the Vuser log files, no action is taken with the wasted time. The actual elapsed transaction times are reported. The lr.getTransactionDuration function also returns the actual elapsed transaction time. This information may be useful in analyzing and developing test scripts.

However, in the on-line graphs in LoadRunner Controller and the transaction response time graphs in LoadRunner Analysis, the transaction times are reported after subtracting the wasted time. This is the time most pertinent to understanding the system being tested.