How to identify Throughput from Summary report - jmeter

I have created a simple script in Jmeter. I have used transaction controller to find out how much time is required to perform particular transactions. As you can see from the image, my api requests are divided in to 3 transactions namely: "Home Page", "Change freq to daily" and "Select brand".
Transaction controller "Home page" has 12 requests in it. Total number of enabled requests are 12.
Transaction controller "Change freq to daily" has 11 requests in it.
Transaction controller "Select brand" has 14 requests in it.
Setting for all the 3 transaction controllers is same which is as below. I have used only 1 thread group. Number of threads are 1 and loop count is also 1
Based on the execution summary report, I have below questions and will be very grateful if anyone can answer them correctly.
As you can see from the image, "Home Page" transaction controller shows number of samples as 1. Should it not show the total number of samples executed which are 12?
Throughput for "Home Page" transaction controller is 22.8/min. So, does this mean that in "Home Page" transaction, 22.8 requests were served per minute? How 22.8 is calculated? Is this the sum of Throughputs of all 12 requests under "Home Page" transaction controller?
In the row named as "Total" and in the "Throughput" column, it shows the Total as 3.7/sec. How the number 3.7 is calculated? What does it signify? Does this mean that for the entire performance test the Throughput is 3.7/sec? How do I find the Throughput for the entire performance test?
I guess "Average" for Home Page transaction controller is showing correct which is the sum of all 12 averages of the 12 api requests fired. Am I correct?
In the row named as "Total" and in the "Average" column, it shows the Total as 538. How where the number 538 calculated? What does this signify?
In the row named as "Total" and in the "Samples" column, it shows 40 samples. This also includes the Transaction Controller samples (which are 3 in total). Is this not misleading as only 37 samples expected (Adding samples in all 3 transaction controllers = 37). Why does it add the 3 samples for the transaction controllers as well? Can we not see the count as 37 which are the actual samples executed (api requests sent to server)?

It should not, it acts as an extra "pseudo" Sampler which holds the cumulative response time of its children, see Using JMeter's Transaction Controller for more details
As per JMeter Glossary:
Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.
The formula is: Throughput = (number of requests) / (total time).
See point 2
It's arithmetic mean of 12 child elapsed times (sum of all response times divided by 12)
See point 4 but instead of 12 sampler results all sample results are considered
See point 1, this is how Transaction Controller works, depending on the mode it can:
Either add an extra sample result containing cumulative response times of its children
Or substitute its children with a single sample result with the cumulative time
so you can choose of having 40 samples (37 + 3 transaction controllers) or 3 samples (transaction controllers only)

Related

Calculate total items per page (pagination logic)

I need to check the total items of every page on pagination.
For example, I have 165 posts and a pagination with 4 links:
1,2,3,4
How can I discover the total items per page based on the number of pages generated?
I don't know what you're using for pagination, but the count for each page is generally set by a variable, then the remainder fills up the last page. It doesn't just output a random amount of the total on each page.
If using Kaminari, for example, there is a variable config.default_per_page.
Something like this should provide the answer.
full_pages = total_posts / default_per_page
spill_over = total_posts - (default_per_page * full_pages)

REST API - Retrieve previous query in dynamoDB

I have 100 rows of data in DynamoDB and a api with path api/get/{number}
Now when I say number=1 api should return me first 10 values. when I say number=2 it should return next 10 values. I did something like this with query, lastEvaluatedKey and sort by on createdOn . Now the use case is if the user passes number=10 after number=2 the lastEvaluatedKey is still that of page 2 and the result would be data of page 3. How can I get data directly. Also if the user goes from number=3 to number=1 still the data will not be of page 1.
I am using this to make API call based of pagination on HTML.
I am using java 1.8 and aws-java-sdk-dynamodb.
Non-sequential pagination in DynamoDB is tough - you have to design your data model around it, if it's an operation that needs to be efficient at all times. For a recommendation in your specific case I'd need more details about the data and access patterns.
In general you have the option of setting the ExclusiveStartKey attribute in the query call, which is similar to an offset in relational databases, but only similar and not identical. The ExclusiveStartKey is the key after which the query will continue, meaning data from your table and not just a number.
That means you usually can't guess it, unless it's a sequential number - which isn't ideal.
For sequential pagination, i.e. the user goes from page 1 to page 2, page 2 to page 3 etc. you can pass that along in the request as a token, but that won't work if the user moves in the other direction page 3 to page 2 or just randomly navigates to page 14.
In your case you only have a limited amount of data - 100 items, so my solution for your specific case would be to query all items and limit the amount of items in the response to n * 10, where n is the result page. Then you return the last 10 items from that result to your client.
This is a solution that would get expensive at scale (time + cost) though, fortunately not many people will use the pagination to go to page 7 or 8 though (you could bury a body on page 2 of the google search results).
Yan Cui has written an interesting post on this problem on Hackernoon, you might want to check it out.

I have to refer the 90% column "Total" row value for response time in Aggregate Report?

For response time I have to refer in Aggregate Report, the 90% column "Total" row value correct?
Note: The value highlighted in below image.
Use Case:Navigating to a page.
1. Number of thread - 1
2. Number of loop - 3
You should refer to each Request because I believe you have "Test" which is a "Transaction Controller" that has checked " Generate Parent Sampler" that adds the whole Test Transaction - Response Times for Requests and influences the Average, and maybe Consider uncheck "Generate Parent Sampler" for a better overview of the Avg Response Time.

JMeter and simulating the real users

I am wondering if there is something I could use to create a simulator using JMeter that would pick the users from my "user list" based on some kind of pattern. In fact, even simpler: imagine I have the users from 0 to N. Some of them are active, some of them are not. I would like to have some simulated users that are active during certain period (say, hour), then they go dormant, others become active etc. So, out of total N users I would have something like X unique active users per hour, Y unique active users per day, Z unique active users per week etc.
I think I could write some kind of generator like this but I am wondering if something already exists - as JMeter plugin or just a library/class that I could use.
See the following test elements which can help you to implement scenario requested:
Ultimate Thread Group - to control virtual users arrival rate and time to hold the load
Constant Throughput Timer - to control virtual users activity in "requests per minute" which can be converted to "requests per second" or "requests per day" by simple arithmetic calculations
Provide uniqueness of virtual users via:
CSV Data Set Config configuration element or __CSVRead() function - for pre-defined users list
__Random or __RandomString function for dynamic unique parameters.

Throughput value in Aggregate Report

I have few questions on the results captured in Aggregate report.
What does the values in the 'Total' row shows?
How it is projected?
Particularly as we concentrate more on the aggregate_report_rate (QPS) field,
Is the value of the aggregate_report_rate in the 'Total' row, calculate the exact QPS?
Is that value is what all we need to say as the exact QPS?
Can someone please clarify on the same?
Aggregate report shows the Transactions per second(TPS) in the column aggregate_report_rate. For individual HTTP request names it shows TPS for that HTTP request itself. The total row shows the overall TPS for all the HTTP requests included in the test plan.
So, all the row show the average TPS for whole duration of the test, the total row shows the overall TPS of the test plan.

Resources