Search code examples
performancejmeterperformance-testingjmeter-4.0

JMeter - Count requests with responses below defined time


Can you recommend plugin or report for Jmeter 4.0 which count number of requests with responses lower than < define time (eg, 200ms, 500ms, etc.)

I would like get answer on below question:

  1. How many requests per sec can be sent that response time of 90% responses is lower than 200ms

  2. How many responses is below 200ms from Total

  3. % of responses to the response below 200 ms from Total


Solution

  • I'm not aware of any existing plugin which implements your requirement, however you can achieve this using JSR223 Listener

    1. Add JSR223 Listener to your Test Plan
    2. Put the following Groovy code into "Script" area:

      if (prev.getTime() < 200) {
          prev.setSampleLabel(prev.getSampleLabel() + " < 200")
      }
      
    3. That's it, if your Sampler response time will be below 200 the JSR223 Listener will amend its label and add < 200 postfix to it.
    4. You can view total number of samplers with response time below 200 ms and 90% percentile using "normal" Aggregate Report listener

      JMeter Aggregate Report Listener