Running a load test for a specific duration and ignore results during the warm-up time.

1,614 views
Skip to first unread message

Isuru Perera

unread,
Jul 18, 2017, 10:52:16 PM7/18/17
to gat...@googlegroups.com
Hi,

Does anyone how we can run a load test for a specific duration? I also want to ignore results during the warm-up time of the server.

My scenario is that I want to load test an API in a server (implemented in Java) and I want the test to run for 15 minutes. Then ignore the results of first 5 minutes considering the Java server warm-up time. I want to measure the requests/s and get the response time distribution when the server is in steady state.

This is what I do currently with Apache JMeter.
  • I set the users and ramp up period in thread group. Then enable scheduler and specify 900 seconds.
  • Use HTTP Sampler in the thread group.
  • Run the load test non-gui mode with JTL file and generate a JMeter Report Dashboard
  • Use another tool to remove first 5 minutes of results from JTL
  • Create a JMeter Report Dashboard from new JTL file.

I want to try this in Gatling, but I still couldn't find a way to do it.

I really appreciate your suggestions to make this work.

Thank you!

Best Regards,


--

slan...@gatling.io

unread,
Jul 19, 2017, 4:08:20 AM7/19/17
to gat...@googlegroups.com
> also want to ignore results during the warm-up time of the server.

Featured in FrontLine

Isuru Perera

unread,
Jul 19, 2017, 4:31:49 AM7/19/17
to gat...@googlegroups.com
Hi Stéphane,

So, you are saying that we can ignore results during the warm-up time of the server with Gatling FrontLine, right? Are there any plans to include that feature in open source version?

I also want to run the test for a specific duration. How can I do that in Gatling?

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Isuru Perera

unread,
Jul 20, 2017, 7:36:13 AM7/20/17
to gat...@googlegroups.com
Hi,

Does anyone know how I can run the load test for a specific duration?
--

slan...@gatling.io

unread,
Jul 20, 2017, 7:42:56 AM7/20/17
to gat...@googlegroups.com
> So, you are saying that we can ignore results during the warm-up time of the server with Gatling FrontLine, right? 

Yes

> Are there any plans to include that feature in open source version?

No

> I also want to run the test for a specific duration. How can I do that in Gatling?

Have you read maxDuration's documentation?
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.

pujitha...@gmail.com

unread,
Jul 20, 2017, 8:15:45 AM7/20/17
to Gatling User Group
Hi Isuru,

You can achieve some of your requirement by using a client side monitoring using graphite and grafana Dashboard. You can chop-off your rampup duration in the dashboard, and can have number of custom graphs as well. 

Kind regards,

-Pujitha.     


Stéphane LANDELLE

unread,
Jul 20, 2017, 8:24:28 AM7/20/17
to gat...@googlegroups.com
The problem with Graphite, InfluxDb and similar tools that don't support storing distributions is that they will mess up with your stats as they will compute percentile averages. And that's super wrong: http://latencytipoftheday.blogspot.fr/2014/06/latencytipoftheday-you-cant-average.html

Stéphane Landelle
GatlingCorp CEO


Isuru Perera

unread,
Jul 20, 2017, 9:04:25 AM7/20/17
to gat...@googlegroups.com, Stéphane LANDELLE
Hi Stéphane,

Thanks a lot for your reply. I actually read about maxDuration. I'm still new to Gatling and I still don't know how to load test a scenario continuously with some users.

For example: I tested the same scenario in http://gatling.io/docs/current/quickstart/ and used maxDuration.

        setUp(scn.inject(atOnceUsers(10))).maxDuration(1 minute).protocols(httpProtocol)

The problem is that, each request will be executed only 10 times and the test will finish before 1 minute.

In JMeter, we can have 10 users and execute requests in an infinite loop for a specific period. I want to know how this can be done in Gatling.

Thanks!

Best Regards,


--

Isuru Perera

unread,
Jul 24, 2017, 7:07:26 AM7/24/17
to gat...@googlegroups.com, Stéphane LANDELLE
Hi,

I managed to run the test as I wanted with the "forever" loop and "during" loop.

"forever" example:

        val scn = scenario("BasicSimulation").forever {
                exec(http("echo")
                        .post("/")
                        .headers(headers)
                        .body(StringBody("""{ "myContent": "myHardCodedValue" }""")).asJSON
            )
        }

        setUp(scn.inject(atOnceUsers(100))).maxDuration(2 minutes).protocols(httpProtocol)

"during" example:

    val scn = scenario("NettySimulation").during(2 minutes) {
                  exec(http("echo")
            .post("/")
            .headers(headers)
            .body(StringBody("""{ "myContent": "myHardCodedValue" }""")).asJSON
            )
        }

    setUp(scn.inject(atOnceUsers(100))).protocols(httpProtocol)


--
Reply all
Reply to author
Forward
0 new messages