Skip to content

Commit

Permalink
[feat] improve intro to scenario docs
Browse files Browse the repository at this point in the history
- Better description with less metaphor
- Example
Part of #808
  • Loading branch information
MattDodsonEnglish committed May 23, 2023
1 parent 7718690 commit d0b3d1c
Showing 1 changed file with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
---
title: 'Executors'
excerpt: 'Executors are the workhorses of the k6 execution engine. Each one schedules VUs and iterations differently, and you choose one depending on the type of traffic you want to model to test your services'
excerpt: 'Executors control how k6 schedules VUs and iterations. Choose the executor to model traffic you want to model to test your services'
---

**Executors** are the workhorses of the k6 execution engine. Each one
schedules VUs and iterations differently, and you'll choose one depending on the type of traffic you
want to model to test your services.
**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.

Define the executor in `executor` key of the scenario object.
Possible values for `executor` are the executor name separated by hyphens.


```javascript
export const options = {
scenarios: {
arbitrary_scenario_name: {
//Name of executor
executor: 'ramping-vus',
// more configuration here
},
},
};
```


<Blockquote mod="note" title="VUs might not distribute uniformely over iterations">

For any given scenario, you can't guarantee that a specific VU can run a specific iteration.
Expand All @@ -24,7 +38,7 @@ But, you _cannot_ reliably map, for example, the tenth VU to the tenth iteration

| Name | Value | Description |
| ---------------------------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Shared iterations](/using-k6/scenarios/executors/shared-iterations) | `shared-iterations` | A fixed amount of iterations are<br/> "shared" between a number of VUs. |
| [Shared iterations](/using-k6/scenarios/executors/shared-iterations) | `shared-iterations` | A fixed amount of iterations are<br/> shared between a number of VUs. |
| [Per VU iterations](/using-k6/scenarios/executors/per-vu-iterations) | `per-vu-iterations` | Each VU executes an exact number of iterations. |
| [Constant VUs](/using-k6/scenarios/executors/constant-vus) | `constant-vus` | A fixed number of VUs execute as many<br/> iterations as possible for a specified amount of time. |
| [Ramping VUs](/using-k6/scenarios/executors/ramping-vus) | `ramping-vus` | A variable number of VUs execute as many<br/> iterations as possible for a specified amount of time. |
Expand Down

0 comments on commit d0b3d1c

Please sign in to comment.