jmeterperformance-testingbeanshelljsr223

JMeter response times and the response times I get on my server are very different


I wrote a script with JSR223 Sampler. It sends certain requests to my server. I also log response times on my server. But there are serious differences between the response times I get in the log and the response times given to me by JMeter. What appears to be 60ms in my log, appears to be around 200ms in JMeter reports.

Additionally, what should I do for samplers for which I do not want the response time to be written?


Solution

  • If it is you who "wrote a script" this should be a question to you.

    I can only assume that JMeter elapsed time includes the time which is needed to establish the connection and the time for the request and response to travel back and forth. See Connect Time and Latency terms in the JMeter Glossary

    If you don't want to record the sample result you can call SampleResult.setIgnore() function anywhere in your script.

    More information on Groovy scripting in JMeter: Apache Groovy: What Is Groovy Used For?