calculation of the total response time using jmeter - jmeter

I ran a test and generated various reports using the listeners. but am confused how to calculate the total response time for the test that has run. have attached the screenshots.
enter image description here

Why do you need a total response time of all the requests of the test? Are all these requests related to 1 transaction? (!!)
1) In that case, You can place all the requests under a Transaction Controller. This will give you the total time of all the requests placed under Transaction Controller.
2) You can calculate the total response time by using Beanshell listener.
3) Write the results in CSV file and you can calculate the sum.
In your case, each and every samples made only one request. So total time would be Average * (No of Samples) = 448 ms

Related

Jmeter response time for parallel execution

I am using Jmeter 5.2, the application i am testing i have split them transaction modules. When i execute the test plan, the elapsed time, latency and connect time were added together for a module in the aggregate report. Since some of the requests runs parallel in a module, that report didn't produce expected results.
Later, i have moved the request to bzm-parallel controller modules. Where, some of the requests fails since some of the requests has to be executed after the previous request.
Is there any way to calculate the exact timetaken for the execution of 1 module in Jmeter considering the parallel execution of requests?
Cumulative execution time of parallel requests equals to the execution time of the longest request so you need to take only that request which elapsed time exceeds its neighbors.
In order to filter out "not interesting" requests you can use one of below optoins:
Put parallel requests under the Transaction Controller
If you're using HTML Reporting Dashboard for results analysis you can consider jmeter.reportgenerator.exporter.html.series_filter property
You can remove the samplers you're not interested in via Filter Results Tool
You can use a Simple controller inside your Parallel controller. This will help you execute the samples in parallel and in the correct sequence as arranged in the simple controller.
Sample:
Parallel Controller
Simple Controller
-- HTTP Sample 1
-- HTTP Sample 2
-- HTTP Sample 3
Output:
HTTP Sample 1
HTTP Sample 2
HTTP Sample 3

Need help on response time

Need help on JMeter response result from the image
My scenario: Am calculating Min/Max/Average response time on Api creating a user account.
1.Login to site
2.Using API request creating a user account - (creating 100 users account using API)
3.Logout.
Observation :
Total elapsed time is 32 mins (which is there in the image).
Response time for 100 users is 90852.
I need to understand how the response time units are measured here.
does 90852 milliseconds mean approximately 90secs.
So is it like a single user account is created in 90 secs by the API?.
So, please tell me how response time is working here when it compared with total response time?
Thanks :)
The average creation of a user took your API 908 ms (the entry with 100 samples ending with /api/users).
Since the line (where the name of the transaction is not in the screenshot) has the sample count 1 and the response time resembles 100*908ms I would guess that you have a Transaction Controller that holds the Loop Controller.
The same hierarchy that you use to organize your test plan also applies to transaction controllers and samplers. So if you group several samplers - and/or transaction controllers - under a parent transaction controller, that parent transaction controller will have the combined response time of all its children.
Response time for 100 users is 90852. - No, only for 1 user. Looking at your image it appears that only 1 sample was collected during 32 mins. So this response time is for that 1 sample not for all 100 users. JMeter only shows you completed responses. Assuming you have a thread group of 100 users, the rest didn't complete / were waiting for the api to respond.
Does 90852 milliseconds mean approximately 90secs. - yes. In your api you seem to be using once only controller for login and authenticate and everything else seems to be running sequentially. So if you are load testing have a slow api response then you won't be able to measure other throughput for the rest of the apis correctly as the slowest api will hold up the thread for a long time.
Hope this helps.
It is hard to provide comprehensive analysis without seeing your Test Plan.
When it comes to your questions:
Total elapsed time is 32 mins (which is there in the image).
this looks a little bit high for me, given you create 100 user accounts and average response time is 908 milliseconds I would expect that your test will finish in 90.8 seconds which is 1.5 minutes.
does 90852 milliseconds mean approximately 90secs.
it rather looks like a sum of all 100 response times most probably you got it from the Transaction Controller
Average Response time is basically arithmetic mean, to wit sum of all response times divided by their count.
First of all you need to understand why does you test take that long.
You seem to be creating 100 user accounts using 1 thread (virtual user) in loop, you might want to consider doing it with multiple threads instead
You should be using JMeter GUI only for tests development and/or debugging, when it comes to test execution you should be running your JMeter tests in command-line non-GUI mode like:
jmeter -n -t test.jmx -l result.jtl

Measure response time for an API

I have 416 webservice API's to test . I am loading those url's from a CSV file . my test need to find an API which takes more than 2 sec to respond . I couldn't find a way to measure response time for an API .
I am using
Thread Users - 416
Ramp up Period - 1
Loop Count - 1
I have tried "View Results in Table" listener which shows the sample time . But the sample time does not show individual response time .
Please let me know if you find any solution ?
You shouldn't use listeners as View Results in Table in Load test because it consumes a lot of resources
this visualizer uses a lot of memory.
Use Duration Assertion instead, defined it with 2000 milliseconds in your case
Duration Assertion tests that each response was received within a given amount of time. Any response that takes longer than the given number of milliseconds (specified by the user) is marked as a failed response.
Add listener Summary report which has columns as average, minimum and maximum response time taken by a hit.You can also save this report by clicking on Save Table data button.
Also, add View Results Tree listener in which Sampler Result tab has all the details corresponding to that hit.
On the "Advanced" tab of the HTTP Request sampler (or even better HTTP Request Defaults) there is Timeouts section where you can define maximum value for establishing the connection and/or getting the response.
If JMeter fails to get the response within the time frame (in milliseconds) the relevant sampler will be marked as failed.
In order to see individual response times - add the variable from the CSV file as HTTP Request label (or prefix or postfix) - this way you will see the associated URLs in the listeners and in the HTML Reporting Dashboard :

How to know the execution time per thread or user in JMeter

I am executing a JMeter script for 25 users i.e threads and I wish to know much time it took for each user to perform the particular action (i.e. perform the complete usecase). My intention is to be able to give an average time so to say that if 25 actual users do this function simultaneously in the real environment then the average time it will take is that amount of time. So I wish to know whether there is a feature in JMeter may be a listener that will enable me to get this statistic.
Transaction Controller is something you're looking for. It measures cumulative time of its children so you will have both individual actions timings and the total time of all actions.
Results can be visualized using i.e. Aggregate Report listener
More information: Using JMeter's Transaction Controller

JMeter Test Plan Validation

I am creating a JMeter test plan and need some validation to verify I'm going about it the right way.
I have the following GA data for our busiest hour.
Hour: 10
Average session duration: 00:02:56
Avg. Page Load Time (sec): 1.57
Sessions: 2441
Page Views: 8361
Number of threads (users):
I've calculated this using the following formula:
2441 (Hourly Sessions) x 176 (Average Session Duration (in seconds)) / 3600
Which gives me 119.
1) Is this the correct approach?
Getting average page load time
I'm attempting to bench mark against the average page load time as reported by GA. So I have created currently the following test plan:
Thread Group:
- HTTP Request (Main Request)
- Aggregate graph
1) This will request (main request) 119 times should I add more pages so that requests total 8361 as per the pages views from GA?
2) I'm unclear about how I should get the test plan to run over an hour as the GA data is over an hour, currently the 119 requests get executed within a few minutes or is it even necessary to run over an hour to get a rough idea of capacity?
3) Is it correct to use the average response time from the aggregate graph and compare that against the Avg. Page Load Time from GA?
1.1) Seems like that - but only if you stick to mimic-ing the actual "average user" way to interact with your service: do some chain of requests (let's call it session) during 176 sec.
Then, yes: if inside one thread, you'd stretch your chain of requests along 176 sec, 1 thread could serve ~20.5 sessions per hour.
Which turns into ~119 threads to meet desired ~2440 requests per hour.
The other approach would be to stick to Page views (8361).
That's if maintaining the "session" and particular request sequence doesn't matter, while load does.
Then it comes to ~2.3 rps flat.
As soon as response time is expected to be around 1.5 sec, you would need at least 3 threads to keep the pace, more would be better to have some room to stretch.
But you won't need a lot of them, because they'd be hanging blocked with I/O most of the time.
Checking the actual throughput value JMeter yields during initial runs, you could adjust the number of threads to optimal.

Resources