JMeter - difference between response times of Parallel controller and HTTP Sampler - jmeter

There is substantial difference between response times of Parallel controller ( with requests for all resources, and 6 connections) and HTTP Sampler of main request( with "download embedded resources" checked, with 6 connection). Why is that?

If you're seeing different response times it means that you either not sending the same requests or sending them in a different way. The best way to check is using a network sniffer tool to compare the network footprint of both approaches.
HTTP Request sampler duration is calculated as:
main request
plus the largest response time of 1st chunk of 6 resources
plus the largest response time of 2nd chunk of 6 resources
etc.
Parallel Controller acts the same but it doesn't add the main request duration to the overall response time
Also if you have more than one/request and/or iteration and HTTP Cache Manager added to the test plan
In general you should not be comparing HTTP Request's response with a plugin, you should compare it with the real browser

Related

In Jmeter - How can i get, how much time taken to navigate a page

While navigating to e.x landing page the blazemeter recorder gives 10 HTTP requests. In this case, how can i get, how much time taken to navigate landing page.
If I summarize all the requests time based on View Results in Table listener, it is more than the reponse time of chrome time hence couldn't get the exact time.
Note: HTTP Request might be sequential or parallel.
Chrome Response time is 4sec but View Results in Table listener sum value is 12sec
I don't think you should have 10 requests, most probably you should have only 1 request.
If remaining 9 requests are for images, scripts, styles, fonts, sounds, etc. - you don't need to add them manually, instead you need to tick Retrieve all embedded resources and Parallel Downloads boxes on "Advanced" tab of the HTTP Request sampler (or even better, HTTP Request Defaults:
If the requests are AJAX - you need to put them under Parallel Controller

JMeter requests delayed without timer

Within my JMeter test plan I have transaction controller which contains multiple requests inside. There are no any timers between HTTP samplers and controller is configured to generate parent sample.
When I run that test most of the samples are OK but there are couple outliers for which response times for parent sample are enormous though HTTP response times inside controller are quite low. After checking I found that there are couple minute gaps between HTTP requests even no timers are configured.
E.g. first HTTP sampler started 04:08:34 and load time was 358 ms. Second sampler started 04:11:41 - so it took more than 3 minutes to start it. Then there were couple more similar requests and overall parent sample time is more than 6 minutes though sum of all HTTP sampler load times is less than 1 second.
Does anyone has an idea why it occasionally takes very long to start next HTTP request? Can it be caused by low resources (like memory) on the machines from which test is executed (it's distributed testing)?
If you don't have Timers or Flow Control Action sampler or Inter-Thread Communication Plugin JMeter executes samplers as fast as it can immediately one after another.
The only reasons I can think of is are:
lack of resources (CPU, RAM, Network, Disk) on JMeter side, I would recommend ensuring that JMeter has enough headroom to operate using i.e. JMeter PerfMon Plugin
the delay can be caused by PreProcessors, PostProcessors and Assertions so you could take a thread dump - it will provide information where exactly JMeter "hangs"

Jmeter for loop http request - parallel

I am using JMeter for image load testing.
I have an array of the image name and looping over that array, I am getting all the image via HTTP request.
-> loop_over_image - for loop controller
-> http_request sampler
for now, it will loop and fetch images via HTTP sampler one by one.
It is possible to make these request parallel.
I am looping over 300 images - means 300 HTTP request, it is taking more than 5 minutes, but in chrome, it is taking 30 seconds because chrome API requests are ASYNC - means kind of parallel.
Is there any way to make these 300 request parallel. I don't think it is possible, because the loop will go to each image one by one.
I am looking for the same solution.
I am extracting from an HTTP response a list of urls and assigning them into a variable (as array).
Parallel controller will not work in this case, since it does not accept an array as an input.
I think that there is not simple way to do it (possible using Java and JSR223Sampler).
JMeter dev community should add this feature to JMeter.
I've opened an enhancement request https://bz.apache.org/bugzilla/show_bug.cgi?id=63526
Please vote up on it, so it will be implemented.
Try with parallel controller or sampler.
Kindly check the below link:-
https://github.com/Blazemeter/jmeter-bzm-plugins/blob/master/parallel/Parallel.md
Hope this helps.

jmeter server response time calculation

I'm basically trying to calculate in JMeter 5.1 the server processing time for a HTTP request. I've read the JMeter documentation (specially https://jmeter.apache.org/usermanual/glossary.html) to know more about Elapsed time, Latency and Connect time.
Let's say I have a test plan with one thread which does successively 3 identical HTTP requests to one server. The thing is that for the first request, Connect time is (obviously) not equal to 0, but it is for second and third request.
However, from my understanding, Latency includes Connect time, hence for my first request, the Latency is always (much) larger than for the second and third request, and it does not reflect the time spent waiting (server processing time) for this first request.
Can I assume that, if I substract the Connect time from the Latency (Latency - Connect time), it gives me a meaningfull value of the server processing time (+ download content time maybe?)
See w3c time-taken HTTP request log field. Just turn this on and post process the HTTP request logs at the end of your test. You will have the complete processing time for each individual request.

Avg. Response Time in Jmeter. Differentiate from Page Load time

What is the meaning of "response time" in Jmeter?
Is the average response time equivalent to Page load time, or is it something different?
As per The Load Reports guide
RESPONSE TIME is the amount of time the system takes to process a
request after it has received one. This parameter does not include
time that it needed to transmit HTTP/s requests over network to
web-server under test.
LATENCY is the delay involved for your request
to reach the server.
The response time that is required to receive a response from the
server is the sum of the response time + latency.
Response time is individual for each request and consists of server response time itself + time required for request to reach the server (latency)
Average response time is being calculated as arithmetical mean of all requests response times.
For instance, you have
Request 1 - 4s
Request 2 - 2s
Request 3 - 5s
So Average Time would be (4 + 3 + 5) / 3 == 4 seconds.
It depends.
How do you define page load time?
JMeter will tell you exactly how long it took to transfer over the network all of elements you want to include as part of a "page load". This can include:
Just the HTML page
The HTML page and all embedded resources on the HTML page (images, css, js)
The HTML page, all embedded resources and additional elements that are loaded after the initial HTML (such as elements that require Javascript / Ajax to load.)
What JMeter won't factor in is how long it took to execute any JS that ran on the page.
Enable "Retrieve All Embedded Resources" in the HTTP Request Sampler.
your Average Response time = Page Load Time
By Default "Retrieve All Embedded Resources" will be unchecked.
In order to measure the response time including the JS, CSS & Images (exactly as in the browser) this property should be checked before running the test.
Hope this will help.

Resources