All Products
Search
Document Center

Performance Testing:Use a think time command

Last Updated:Nov 01, 2024

The think time command feature is used to simulate the time that a user spends thinking and reacting between two actions in the stress testing process. Think time supports the Fixed, Uniform Distribution, and Normal Distribution modes. This topic describes how to add a think time command.

Procedure

  1. Log on to the PTS console, choose Performance Test > Create Scenario, and then click PTS.

  2. On the Scenario Settings tab of the Create PTS Scenario page, configure basic request information for an HTTP node.

  3. On the Scenario Settings tab, click the drop-down arrow to the right of Add Instruction and select Think Time.

  4. In the Think Time row, click the drop-down arrow. Then, configure the Timer Type parameter and the Latency parameter. The Timer Type parameter has the following values:

    • Fixed

      The request continues after a fixed waiting period of N elapses. N indicates the pause duration. Unit: milliseconds.

      image

    • Uniform Distribution

      The request continues after a random waiting period of N elapses. N falls into the range of [Delay offset, Delay offset + Changeable span]. For example, the delay offset is 3, and the changeable span is 2. In this case, the time range for the delay is from 3 to 5, and the request waits for 3, 4, or 5 milliseconds.

      image

    • Normal Distribution

      The request continues after a waiting period of N elapses. N follows a normal distribution (Gaussian distribution). The mean μ indicates the central value. The variance σ2 indicates the dispersion of values around the mean. The smaller the variance is, the more closely the values in the dataset are clustered around the mean. The larger the variance is, the more spread out the values in the dataset are around the mean.

      image