Skip to content

Commit 6149c54

Browse files
committed
Add Glossary
1 parent 5a316cc commit 6149c54

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

examples/performance-testing-antipattern-examples.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22

33
## Antipattern 1: Ignoring Think Time
44

5-
Excluding think time between user actions can result in unrealistic performance
6-
metrics for certain types of tests, such as average, stress, and soak tests.
7-
However, think time is less critical for tests like breakpoint and spike tests,
8-
as other parameters can control these scenarios effectively. Incorporating
9-
think time is crucial when simulating real user behavior based on user
10-
scenarios. In the provided example, user actions are executed without any delay,
11-
which does not accurately reflect real-world conditions for this type of test.
5+
Excluding think time between user actions can result in unrealistic performance metrics for certain types of tests, such as average, stress, and soak tests. However, think time is less critical for tests like breakpoint and spike tests, as other parameters can control these scenarios effectively. Incorporating think time is crucial when simulating real user behavior based on user scenarios. In the provided example, user actions are executed without any delay, which does not accurately reflect real-world conditions for this type of test.
126

137
```javascript
148
export default function () {
@@ -84,7 +78,7 @@ export default function () {
8478

8579
### Solution
8680

87-
Executors control how k6 schedules VUs and iterations. The executor that you choose depends on the goals of your test and the type of traffic you want to model. For example, the `ramping-vus` executor gradually increases the number of VUs over a specified duration, allowing for more realistic load testing for specific test types.
81+
Executors control how K6 schedules VUs and iterations. The executor that you choose depends on the goals of your test and the type of traffic you want to model. For example, the `ramping-vus` executor gradually increases the number of VUs over a specified duration, allowing for more realistic load testing for specific test types.
8882

8983
```javascript
9084
export const options = {
@@ -112,13 +106,28 @@ export default function () {
112106

113107
Based upon our test scenario inputs and results:
114108

115-
- The configuration defines 2 stages for a total test duration of 30 seconds;
116-
- Stage 1 ramps up VUs linearly from the startVUs of 0 to the target of 10 over a 20 second duration;
117-
- From the 10 VUs at the end of stage 1, stage 2 then ramps down VUs linearly to the target of 0 over a 10 second duration;
118-
- Each iteration of the default function is expected to be roughly 515ms, or ~2/s;
119-
- As the number of VUs changes, the iteration rate directly correlates; each addition of a VU increases the rate by about 2 iters/s, whereas each subtraction of a VU reduces by about 2 iters/s;
109+
- The configuration defines 2 stages for a total test duration of 30 seconds.
110+
- Stage 1 ramps up VUs linearly from the 0 to the target of 10 over a 20 second duration.
111+
- From the 10 VUs at the end of stage 1, stage 2 then ramps down VUs linearly to the target of 0 over a 10 second duration.
112+
- Each iteration of the default function is expected to be roughly 515ms, or ~2/s.
113+
- As the number of VUs changes, the iteration rate directly correlates; each addition of a VU increases the rate by about 2 iterations/s, whereas each subtraction of a VUs reduces by about 2 iterations/s.
120114
- The example performed ~300 iterations over the course of the test.
121115

122116
#### Chart representation of the test execution
123117

124118
![ramping-vus execution chart](../assets//images//examples/ramping-vus.png)
119+
120+
## Glossary
121+
122+
### **VU**
123+
124+
- Virtual User
125+
126+
### **Think Time**
127+
128+
- Amount of time a script stops during test execution to
129+
replicate delays experienced by real users while using an application.
130+
131+
### **Iteration**
132+
133+
- A single execution of the default function in a K6 script.

0 commit comments

Comments
 (0)