Creating rate generators in user groups
A rate generator is a workload container that specifies the number of tasks that the virtual testers run in a given time period. For example, you might be testing an Order Entry group that completes 10 forms every hour, or you might be testing a web server that you want to be able to support 100 hits every minute. Use a rate generator to model this time-based behavior.
Before you begin
About this task
If the rate generator does not meet the target rate, it could mean that there are performance issues with the application or there are insufficient virtual users or agents to meet the target rate. All rate generators are coordinated, which means they have a built-in synchronization point and all virtual testers work together to generate the workload. You can add a rate generator to a user group in a schedule or to a compound test.
- You cannot have elements such as loop, finally, rate generator, or transaction as a parent to the rate generator.
- The same rate generator, as identified by name, can appear in more than one User Group in a schedule.
- Rate generators can only be added to percentage user groups. A percentage user group containing a rate generator may not be modified to be a fixed user group.
Procedure
- From the Test Navigator view, double-click a Schedule to open.
- Select a user group and click .
- Specify a name to the rate generator.
-
Set the duration of the rate generator.
- To specify the number of iterations that the rate generator should run, select Count-based.
- To specify the minimum time for the generator to run, select Time-based. The generator always finishes the iteration. For example, if you select a time of 1 second and a rate generator takes 10 seconds to run, the generator finishes one iteration, and then checks the time.
- To continue running the rate generator until it is manually stopped by you or when the last schedule stage duration expires, select Infinite.
- The Uninterruptible iteration option modifies the behavior of the rate generator if schedule execution is stopping. Select this check box to continue running the rate generator until the current iteration completes. If a timeout to stop schedule execution occurs before an iteration completes, the rate generator stops.
-
Set the rate type of the rate generator.
- To ensure that all of the virtual users in the schedule maintain the desired transaction rate irrespective of the user load, select Total Rate.
- To adjust the transaction rate proportionally to the number of virtual users specified in a stage of a schedule, select User Rate. For example, to compare a workload at 100 virtual users a minute, 200 virtual users a minute, and 300 virtual users a minute, set the stages with that many virtual users. User rate is dynamic and is adjusting at stages, whether users are ramping up or down or are added manually.
- In Iteration rate, specify the number of times the rate generator runs in a specified time period.
-
In Variance, specify a percentage value that is used to determine the
range when the transactions start.
For example, the transaction rate is 4 every minute (that is, 1 transaction for every 15-second interval). If you select a variance of 20%, your transaction has a 3-second window on each side of that 15-second interval, because 20% of 15 seconds is 3 seconds. Therefore, the first transaction starts at 12–18 seconds. The second transaction starts 15 seconds (plus or minus 3 seconds) after the first transaction starts. If the first transaction starts at 12 seconds, the second transaction would start at 24 to 30 seconds. However, if the first transaction starts at 18 seconds, the second transaction would start at 30 to 36 seconds.
Because each transaction starts randomly within the range that you specify, it is normal for transactions to run at a rate that is faster or slower than the rate that you selected for short periods of time. For example, if a transaction starts every 12 seconds for a minute, the rate for that initial interval is 5 every minute and not the rate of 4 every minute that you selected. Over time, however, the transaction rate averages out to 4 every minute.
-
In Distribution, specify the frequency rate at which the rate generator should run.
- Select Constant for the workload of the rate generator to occur exactly at the rate you specify. For example, if the iteration rate is 4 every minute, the workload starts at 15 seconds, 30 seconds, 45 seconds, and 60 seconds, which is exactly 4 every minute, evenly spaced, with a 15-second interval.
- Select Uniform when the time between each workload is not constant. However, the workload that occurred over time averages out to the rate that you specified. The time between the start of each workload is chosen randomly with a uniform distribution within the selected range as specified in Variance.
- Select Negative Exponential to emulate the spike of activity followed by a dull period that is typical of user behavior. So, if the rate is 4 every minute, the probability that the workload starts immediately is high, but decreases over time. IBM® Rational® Performance Tester maintains the desired average rate.
- Add the test under the Rate Generator and save the schedule. After the schedule run completes, in addition to the Performance Report, the Rate Generator report is available.