Customized Response Time in Gatling Report

Knoldus Inc.
Knoldus - Technical Insights
3 min readFeb 3, 2016

Gatling is a highly capable load testing tool which gives high performance. Some times we face problem in customization response time for our application.

In this Blog we will analyse how can we customize response time in Gatling. In Global Information Section

blog1

In graphical format,this Section Displays the Number of Requests captures in the given Load testing. Every requests are displays according to their Response times.

These Requests are divided into four different Sections:

  • In first section(green color), the requests whose response times are less than Lower bound
  • In second section(yellow color), the requests whose response times are are between the lower bound and the higher bounds
  • In third section (orange color),the requests whose response times are greater than the higher bound
  • In fourth section (red color),the requests who fail to respond

In Gatling test report by default Response times are:

  • Lower Bound is 800ms
  • Upper Bound is 1200ms

This time is editable, depend upon our project requirements. we can modify this time if we need.

For do this

  • Go to the directory where Gatling tool is downloaded
  • Inside the Gatling bundle directory look for the conf folder.
  • File named gatling.conf. Open this .conf in a text editor.

The charting section in the .conf file, example shown as below:

[code language=”text”]

charting {
#noReports = false # When set to true, don’t generate HTML reports
#maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports
#accuracy = 10 # Accuracy, in milliseconds, of the report’s stats
indicators {
#lowerBound = 800 # Lower bound for the requests’ response time to track in the reports and the console summary
#higherBound = 1200 # Higher bound for the requests’ response time to track in the reports and the console summary
#percentile1 = 50 # Value for the 1st percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile2 = 75 # Value for the 2nd percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile3 = 95 # Value for the 3rd percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile4 = 99 # Value for the 4th percentile to track in the reports, the console summary and GraphiteDataWriter
}
}

[/code]

The above code segment lists by default values as comes with Gatling bundle. Inside that look for lowerBound and higherBound. these two are set as 800 and 1200 respectively. The unit is in milliseconds.

Suppose project requires to set these two as 1000 and 1800 respectively. Modify these two values and save the .conf file. and these two line of code by removing the #.

Like this:

[code]

charting {
#noReports = false # When set to true, don’t generate HTML reports
#maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports
#accuracy = 10 # Accuracy, in milliseconds, of the report’s stats
indicators {
lowerBound = 1000 # Lower bound for the requests’ response time to track in the reports and the console summary
higherBound = 1800 # Higher bound for the requests’ response time to track in the reports and the console summary
#percentile1 = 50 # Value for the 1st percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile2 = 75 # Value for the 2nd percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile3 = 95 # Value for the 3rd percentile to track in the reports, the console summary and GraphiteDataWriter
#percentile4 = 99 # Value for the 4th percentile to track in the reports, the console summary and GraphiteDataWriter
}
}[/code]

After changes are saved Run the test case and observe the response times of the requests should be modified in the chart and also showing in information section.

So this is how we can customized response time according to our project requirement

--

--

Knoldus Inc.
Knoldus - Technical Insights

Group of smart Engineers with a Product mindset who partner with your business to drive competitive advantage | www.knoldus.com