Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit e3337a7

Browse files
committed
MAGETWO-72212: [PAT] Split into fragments new benchmark.jmx
1 parent eb8fa4e commit e3337a7

File tree

1 file changed

+59
-77
lines changed

1 file changed

+59
-77
lines changed

setup/performance-toolkit/README.md

Lines changed: 59 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -53,50 +53,51 @@ There are two JMeter scenarios located in `setup/performance-toolkit` folder: `b
5353

5454
The following parameters can be passed to the `benchmark.jmx` scenario:
5555

56-
| Parameter Name | Default Value | Description |
57-
| --------------------------------- | ------------------- | ---------------------------------------------------------------------------------------- |
58-
| host | | URL component 'host' of application being tested (URL or IP). |
59-
| base_path | | Base path for tested site. |
60-
| admin_path | backend | Admin backend path. |
61-
| admin_user | admin | Admin backend user. |
62-
| admin_password | 123123q | Admin backend password. |
63-
| customer_password | 123123q | Storefront customer password. |
64-
| customers_page_size | 20 | Page size for customers grid in Magento Admin. |
65-
| files_folder | ./files/ | Path to various files that are used in scenario (`setup/performance-toolkit/files`). |
66-
| loops | 1 | Number of loops to run. |
67-
| orders_page_size | 500 | Page size for orders grid. |
68-
| test_duration | 900 | Total duration (s) of scenario execution. |
69-
| numberOfThreads | 48 | Total number of all threads. |
70-
| frontEndPoolPercentage | 90 | Percentage of Frontend Pool. |
71-
| adminPoolPercentage | 10 | Percentage of Admin Pool. |
72-
| browseCatalogByGuestPercentage | 30 | Percentage of threads in Frontend Pool that emulate catalog browsing activities. |
73-
| siteSearchPercentage | 30 | Percentage of threads in Frontend Pool that emulate catalog search activities. |
74-
| checkoutByGuestPercentage | 4 | Percentage of threads in Frontend Pool that emulate checkout by guest. |
75-
| checkoutByCustomerPercentage | 4 | Percentage of threads in Frontend Pool that emulate checkout by customer. |
76-
| addToCartPercentage | 28 | Percentage of threads in Frontend Pool that emulate abandoned cart activities. |
77-
| addToWishlistPercentage | 2 | Percentage of threads in Frontend Pool that emulate adding products to Wishlist. |
78-
| compareProductsPercentage | 2 | Percentage of threads in Frontend Pool that emulate products comparison. |
79-
| productCompareDelay | 0 | Delay (s) between iterations of product comparison. |
80-
| promotionRulesPercentage | 10 | Percentage of threads in Admin Pool that emulate creation of promotion rules. |
81-
| adminPromotionsManagementDelay | 0 | Delay (s) between creation of promotion rules. |
82-
| merchandisingPercentage | 50 | Percentage of threads in Admin Pool that emulate merchandising activities. |
83-
| adminProductManagementPercentage | 90 | Percentage of threads in Merchandising Pool that emulate product management activities. |
84-
| adminCategoryManagementPercentage | 10 | Percentage of threads in Merchandising Pool that emulate category management activities. |
85-
| adminProductEditingPercentage | 60 | Percentage of threads in Product Management Pool that emulate product editing. |
86-
| adminProductCreationPercentage | 40 | Percentage of threads in Product Management Pool that emulate creation of products. |
87-
| adminCategoryManagementDelay | 0 | Delay (s) between iterations of category management activities. |
88-
| apiProcessOrdersPercentage | 30 | Percentage of threads in Admin Pool that emulate orders processing activities. |
89-
| apiProcessOrders | 5 | Number of orders for process in Admin API - Process Orders |
90-
| adminEditOrderPercentage | 10 | Percentage of threads in Admin Pool that emulate order edit |
91-
| csrPoolUsers | 0 | Users of CSR Pool. |
92-
| csrBrowseCustomersPercentage | 10 | Percentage of threads in CSR Pool that emulate customers browsing activities. |
93-
| csrCreateOrderPercentage | 70 | Percentage of threads in CSR Pool that emulate creation of orders. |
94-
| csrCreateProcessReturnsPercentage | 20 | Percentage of threads in CSR Pool that emulate creation/processing of returns. |
95-
| csrCreateProcessReturnsDelay | 0 | Delay (s) between creation of returns. |
96-
| wishlistDelay | 0 | Delay (s) between adding products to Wishlist. |
97-
| categories_count | 200 | Total number of categories that are be used in scenario. |
98-
| simple_products_count | 30 | Total number of simple products that are be used in scenario. |
99-
| nested_categories_count | 50 | Total number of last-level categories that can be used in scenario. |
56+
| Parameter Name | Default Value | Description |
57+
| --------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------- |
58+
| host | | URL component 'host' of application being tested (URL or IP). |
59+
| base_path | | Base path for tested site. |
60+
| admin_path | backend | Admin backend path. |
61+
| admin_user | admin | Admin backend user. |
62+
| admin_password | 123123q | Admin backend password. |
63+
| customer_password | 123123q | Storefront customer password. |
64+
| customers_page_size | 20 | Page size for customers grid in Magento Admin. |
65+
| files_folder | ./files/ | Path to various files that are used in scenario (`setup/performance-toolkit/files`). |
66+
| loops | 1 | Number of loops to run. |
67+
| frontendPoolUsers | 1 | Total number of Frontend threads. |
68+
| adminPoolUsers | 1 | Total number of Admin threads. |
69+
| browseCatalogByGuestPercentage | 30 | Percentage of threads in Frontend Pool that emulate catalog browsing activities. |
70+
| searchQuickPercentage | 18 | Percentage of threads in Frontend Pool that emulate catalog search activities. |
71+
| searchQuickFilterPercentage | 9 | Percentage of threads in Frontend Pool that emulate catalog search activities. |
72+
| searchAdvancedPercentage | 3 | Percentage of threads in Frontend Pool that emulate catalog search activities. |
73+
| checkoutByGuestPercentage | 4 | Percentage of threads in Frontend Pool that emulate checkout by guest. |
74+
| checkoutByCustomerPercentage | 4 | Percentage of threads in Frontend Pool that emulate checkout by customer. |
75+
| addToCartPercentage | 28 | Percentage of threads in Frontend Pool that emulate abandoned cart activities. |
76+
| addToWishlistPercentage | 2 | Percentage of threads in Frontend Pool that emulate adding products to Wishlist. |
77+
| compareProductsPercentage | 2 | Percentage of threads in Frontend Pool that emulate products comparison. |
78+
| productCompareDelay | 0 | Delay (s) between iterations of product comparison. |
79+
| promotionRulesPercentage | 10 | Percentage of threads in Admin Pool that emulate creation of promotion rules. |
80+
| adminPromotionsManagementDelay | 0 | Delay (s) between creation of promotion rules. |
81+
| adminCategoryManagementPercentage | 5 | Percentage of threads in Merchandising Pool that emulate category management activities. |
82+
| adminProductEditingPercentage | 27 | Percentage of threads in Merchandising Pool that emulate product editing. |
83+
| adminProductCreationPercentage | 18 | Percentage of threads in Merchandising Pool that emulate creation of products. |
84+
| adminPromotionRulesPercentage | 10 | Percentage of threads in Admin Pool that emulate admin rules creating activities. |
85+
| adminCategoryManagementDelay | 0 | Delay (s) between iterations of category management activities. |
86+
| apiProcessOrdersPercentage | 30 | Percentage of threads in Admin Pool that emulate orders processing activities. |
87+
| apiProcessOrders | 5 | Number of orders for process in Admin API - Process Orders. |
88+
| adminEditOrderPercentage | 10 | Percentage of threads in Admin Pool that emulate order edit. |
89+
| csrPoolUsers | 0 | Users of CSR Pool. |
90+
| csrBrowseCustomersOddPercentage | 2 | Percentage of threads in CSR Pool that emulate customers browsing activities. |
91+
| csrBrowseCustomersEvenPercentage | 2 | Percentage of threads in CSR Pool that emulate customers browsing activities. |
92+
| csrBrowseCustomersFilteringPercentage | 2 | Percentage of threads in CSR Pool that emulate customers browsing activities. |
93+
| csrBrowseCustomersSortingPercentage | 2 | Percentage of threads in CSR Pool that emulate customers browsing activities. |
94+
| csrBrowseCustomersFilteringSortingPercentage | 2 | Percentage of threads in CSR Pool that emulate customers browsing activities. |
95+
| csrCreateOrderPercentage | 70 | Percentage of threads in CSR Pool that emulate creation of orders. |
96+
| csrCreateProcessReturnsPercentage | 20 | Percentage of threads in CSR Pool that emulate creation/processing of returns. |
97+
| csrCreateProcessReturnsDelay | 0 | Delay (s) between creation of returns. |
98+
| wishlistDelay | 0 | Delay (s) between adding products to Wishlist. |
99+
| categories_count | 200 | Total number of categories that are be used in scenario. |
100+
| simple_products_count | 30 | Total number of simple products that are be used in scenario. |
100101

101102
Parameters must be passed to command line with the `J` prefix:
102103

@@ -116,7 +117,7 @@ To get more details about available JMeter options, read [Non-GUI Mode](http://j
116117
For example, you can run a scenario via console with 100 threads for 5 minutes as follows:
117118

118119
cd {JMeter path}/bin/
119-
jmeter -n -t {path to peformance toolkit}/benchmark.jmx -j ./jmeter.log -l ./jmeter-results.jtl -Jhost=magento2.dev -Jbase_path=/ -Jadmin_path=admin -Jtest_duration=300 -JnumberOfThreads=100
120+
jmeter -n -t {path to peformance toolkit}/benchmark.jmx -j ./jmeter.log -l ./jmeter-results.jtl -Jhost=magento2.dev -Jbase_path=/ -Jadmin_path=admin -Jfiles_folder = /opt/mpaf/tool/fragments/files/
120121

121122
As a result, you will get `jmeter.log` and `jmeter-results.jtl`. The`jmeter.log` contains information about the test run and can be helpful in determining the cause of an error. The JTL file is a text file containing the results of a test run. It can be opened in GUI mode to perform analysis of the results (see the *Output* section below).
122123

@@ -192,7 +193,7 @@ For more details, read [Summary Report](http://jmeter.apache.org/usermanual/comp
192193

193194
`benchmark.jmx` scenario has the following thread groups and default percentage breakdown:
194195

195-
- **Frontend Pool** (90%)
196+
- **Frontend Pool** (frontendPoolUsers)
196197

197198
| Thread Group Name | Label Suffix | % of Pool |
198199
| ------------------------- | ------------------------------------------------------ | --------- |
@@ -209,50 +210,31 @@ Site Search thread group contains 3 variations:
209210
- Quick Search With Filtering (30%)
210211
- Advanced Search (10%)
211212

212-
- **Admin Pool** (10%)
213+
- **Admin Pool** (adminPoolUsers)
213214

214215
| Thread Group Name | Label Suffix | % of Pool |
215216
| ----------------------------------------- | ------------ | --------- |
216-
| *Merchandising Pool* (see below) | - | 50 |
217217
| Admin Promotion Rules | - | 10 |
218218
| Admin API - Process Orders | - | 30 |
219219
| Admin Edit Order | - | 10 |
220+
| Admin Category Management (Merchandising) | - | 5 |
221+
| Admin Edit Product (Merchandising) | - | 27 |
222+
| Admin Create Product (Merchandising) | - | 18 |
220223

221-
*Merchandising Pool* (50% of Admin Pool)
222-
223-
| Thread Group Name | Label Suffix | % of Pool |
224-
| ----------------------------------------- | ------------ | --------- |
225-
| Admin Category Management (Merchandising) | - | 10 |
226-
| Admin Edit Product (Merchandising) | - | 55 |
227-
| Admin Create Product (Merchandising) | - | 35 |
228-
229-
- **CSR Pool** (0%)
224+
- **CSR Pool** (csrPoolUsers)
230225

231226
| Thread Group Name | Label Suffix | % of Pool |
232227
| -------------------------- | ------------ | --------- |
233228
| CSR Browse Customers | - | 10 |
234229
| CSR Create Order | - | 70 |
235230
| CSR Create/Process Returns | - | 20 |
236231

237-
The number of threads in each group can be calculated by formula:
238-
239-
N = {numberOfThreads} * {poolPercentage} * {threadGroupPercentage} / 10000
240-
241-
For example, the value of {numberOfThreads} parameter is 100 and we want to get the number of threads in the *Checkout By Guest* group:
242-
243-
N = 100 * 90 * 4 / 10000 = 4
244-
245-
The *Merchandising Pool* and the *Product Management Pool* should be taken into account when the number of product or category management threads needs to be calculated. For example, the number of threads in *Admin Create Product (Merchandising)* group is calculated as follows:
246-
247-
N = {numberOfThreads} * {adminPoolPercentage} * {merchandisingPercentage} * {adminProductManagementPercentage} * {adminProductCreationPercentage} / 100 / 100 / 100 / 100
248-
249-
If {numberOfThreads} equals to 100:
250-
251-
N = 100 * 10 * 50 * 90 * 40 / 100000000 = 2
252-
253-
To change the percentage breakdown, pass custom values for each pool or thread group to the script. For example, to run the scenario with *Frontend Pool* only enabled, run the script with the following parameters
254-
255-
-JfrontEndPoolPercentage=100 -JadminPoolPercentage=0 -JcsrPoolPercentage=0.
232+
CSR Browse Customers thread group contains 5 variations:
233+
- View Odd Grid Pages (20%)
234+
- View Even Grid pages (20%)
235+
- Filtering (20%)
236+
- Sorting (20%)
237+
- Filtering and Sorting (20%)
256238

257239
**Legacy Threads**
258240

@@ -271,7 +253,7 @@ The script parses the JTL file and generates an aggregate report in CSV format.
271253

272254
1. Summary information: Checkouts Per Hour, Page Views Per Hour and Test Duration (in seconds)
273255
2. Aggregated information about all requests within each thread group (median time, average time, min/max, amount of hits per hour, etc.)
274-
3. Aggregated information about common requests (open home page, category page, product page, login, etc.) accross the entire scenario
256+
3. Aggregated information about common requests (open home page, category page, product page, login, etc.) across the entire scenario
275257
4. List of the requests that weren't executed during the scenario run
276258

277259
Also, the aggregate report can include information about the memory usage for each request type. This requires additional configuration. You should add the following code at the end of `pub/index.php`:

0 commit comments

Comments
 (0)