# Ramp and Hold Users for Some time and Ramp again

**URL:** <https://community.gatling.io/t/ramp-and-hold-users-for-some-time-and-ramp-again/5536>\
**Category:** Gatling (Open-Source)\
**Created:** [March 11, 2020, 5:47am UTC](https://community.gatling.io/t/ramp-and-hold-users-for-some-time-and-ramp-again/5536 "2020-03-11T05:47:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinod\_Krishnan](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@Vinod\_Krishnan](https://community.gatling.io/u/Vinod_Krishnan)\
**Post date:** [March 11, 2020, 5:47am UTC](https://community.gatling.io/t/ramp-and-hold-users-for-some-time-and-ramp-again/5536/1 "2020-03-11T05:47:27Z")

</div>

I have the following scenario to be load tested for a service and it does not seem to work as expected. My scenario is as follows.

- Test with `rampUsers(100)` over `15 minutes duration`
- Hold the users for about 10 minutes `holdFor(10 minutes)`
- Then again `rampUsers(200)` over `15 minutes duration`
- Hold the users for about 10 minutes `holdFor(10 minutes)`
- Then again `rampUsers(200)` over `15 minutes duration`

I am trying to use `throttle` option for this but it does not seem to work as expected here is my code snippets combinations that I have tried so far

```auto
//NUM_USERS = 300
//DURATION = 15 minutes
//CONSTANT_DURATION = 5 minutes
// Tried with different combinations of NUM_USERS and DURATION but not helpful

scn.inject(
      rampUsers(NUM_USERS*1) during DURATION,
      constantUsersPerSec(1) during CONSTANT_DURATION,
      rampUsers(NUM_USERS*2) during DURATION,
      constantUsersPerSec(2) during CONSTANT_DURATION,
      rampUsers(NUM_USERS*3) during DURATION,
      constantUsersPerSec(3) during CONSTANT_DURATION
)

scn.inject(
          rampUsers(NUM_USERS) during DURATION
        ).throttle(
          reachRps(NUM_USERS/4) in (CONSTANT_DURATION),
          holdFor(CONSTANT_DURATION),
          jumpToRps(NUM_USERS/3),
          holdFor(CONSTANT_DURATION),
          jumpToRps(NUM_USERS/2),
          holdFor(CONSTANT_DURATION)
)

scn.inject(
      rampUsers(NUM_USERS) during DURATION
    ).throttle(
        holdFor(CONSTANT_DURATION),
        reachRps(NUM_USERS+NUM_USERS) in (DURATION+DURATION),
        holdFor(CONSTANT_DURATION)
)

```

Can any one help on this which one works in this case. I would like to have a graph like this
