---
title: "Design your load profile | Grafana Labs"
description: "Choose VU count, duration, and ramp-up shape to simulate realistic traffic using the ramping-vus executor."
---

# Design your load profile

A load profile defines how many virtual users (VUs) hit your system and for how long. The shape of the profile matters because a sudden spike of traffic produces different results than a gradual ramp. For a reliable baseline, you want a profile that ramps up to a steady state, holds long enough to collect stable data, and then ramps back down.

k6 provides the `ramping-vus` executor for this purpose. You configure it with a `stages` array where each stage specifies a target VU count and a duration. k6 linearly ramps between stages, giving you full control over the traffic shape.

To design a load profile for your baseline test, complete the following steps:

1. In your code editor, create a new file named `baseline.js` and add the following imports.
   
   If you prefer a visual approach to script creation, you can use [k6 Studio](/docs/k6-studio/). This path uses a code editor so you can see and modify the script directly as you add checks and thresholds in later milestones.
   
   JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```javascript
   import http from 'k6/http';
   import { sleep } from 'k6';
   ```
2. Define your load profile using the `stages` option.
   
   The following example ramps up to 20 VUs over 30 seconds, holds steady for 1 minute, then ramps back down over 30 seconds:
   
   JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```javascript
   export const options = {
     stages: [
       { duration: '30s', target: 20 },
       { duration: '1m', target: 20 },
       { duration: '30s', target: 0 },
     ],
   };
   ```
   
   The `stages` shorthand automatically uses the `ramping-vus` executor. Adjust the `target` values to match the concurrent user count you expect in production, and adjust durations to allow enough time for metrics to stabilize.
3. Add the default function that contains your test logic:
   
   JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```javascript
   export default function () {
     http.get('https://quickpizza.grafana.com');
     sleep(1);
   }
   ```
4. Replace the URL with the endpoint you want to baseline.
5. Save the file. Your complete `baseline.js` should look like this:
   
   JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```javascript
   import http from 'k6/http';
   import { sleep } from 'k6';
   
   export const options = {
     stages: [
       { duration: '30s', target: 20 },
       { duration: '1m', target: 20 },
       { duration: '30s', target: 0 },
     ],
   };
   
   export default function () {
     http.get('https://quickpizza.grafana.com');
     sleep(1);
   }
   ```
   
   > Tip
   > 
   > The steady-state stage (the middle stage) is where your baseline data comes from. Make it long enough, at least 1 minute, so the metrics stabilize and reflect consistent system behavior rather than warm-up effects.

In the next milestone, you add checks to validate that responses are correct, not just fast.
