This repository was archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Added TTFB_TESTED_PAGES #4817
Merged
Merged
Added TTFB_TESTED_PAGES #4817
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2ab77cf
Added TTFB_TESTED_PAGES
meker12 d39ddbb
Fixed broken link.
meker12 d59a6bc
Updated based on review feedback
meker12 c311ee0
Added release note to ece-tools v2.1 and 2.2
meker12 9fe0b24
Apply suggestions from code review
meker12 772026c
Added 2.3 release note for TTFB_TESTED_PAGES
meker12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
group: cloud-guide | ||
title: Post-deploy variables | ||
functional_areas: | ||
- Cloud | ||
- Configuration | ||
--- | ||
The following _post\_deploy_ variables control actions in the post-deploy phase and can inherit and override values from the [Global variables]({{ page.baseurl }}/cloud/env/variables-global.html). Insert these variables in the `post-deploy` stage of the `.magento.env.yaml` file: | ||
|
||
```yaml | ||
stage: | ||
post-deploy: | ||
POST-DEPLOY_VARIABLE_NAME: value | ||
``` | ||
|
||
{% include cloud/customize-build-deploy.md %} | ||
|
||
### `TTFB_TESTED_PAGES` | ||
|
||
- **Default**— `[]` (an empty array) | ||
- **Version**—Magento 2.1.4 and later | ||
|
||
Configure _Time To First Byte_ (TTFB) testing for specified pages to test your {{ site.data.var.ece }} site performance. For each page to page to test, specify the absolute path reference or an absolute URL with protocol and host. | ||
|
||
```yaml | ||
stage: | ||
post-deploy: | ||
TTFB_TESTED_PAGES: | ||
- "index.php" | ||
- "index.php/customer/account/create" | ||
- "https://example.com/catalog/some-category" | ||
``` | ||
|
||
After you specify the pages to test and commit your changes, the _Time To First Byte_ test runs during the post-deploy phase and posts results for each path to the cloud log: | ||
|
||
```terminal | ||
[2019-06-20 20:42:22] INFO: TTFB test result: 0.313s {"url":"https://staging-tkyicst-xkmwgjkwmwfuk.us-4.magentosite.cloud/customer/account/create","status":200} | ||
[2019-06-20 20:42:22] INFO: TTFB test result: 0.408s {"url":"https://staging-tkyicst-xkmwgjkwmwfuk.us-4.magentosite.cloud/checkout/cart","status":200} | ||
``` | ||
|
||
For redirected paths, the log reports the path of the redirect target instead of the one configured in the environment variable. If you specify an invalid path, the log displays a warning message. | ||
|
||
### `WARM_UP_PAGES` | ||
|
||
- **Default**— `index.php` | ||
- **Version**—Magento 2.1.4 and later | ||
|
||
Customize the list of pages used to preload the cache in the `post_deploy` stage. You must configure the post-deploy hook. See the [hooks section][] of the `.magento.app.yaml` file. | ||
|
||
- **single pages**—Specify a single page to add to the cache. You do not have to indicate the default base URL. The following example caches the `BASE_URL/index.php` page: | ||
|
||
```yaml | ||
stage: | ||
post-deploy: | ||
WARM_UP_PAGES: | ||
- "index.php" | ||
``` | ||
|
||
- **multiple domains**—List multiple URLs. The following example caches pages from two domains: | ||
|
||
```yaml | ||
stage: | ||
post-deploy: | ||
WARM_UP_PAGES: | ||
- 'http://example1.com/test' | ||
- 'http://example2.com/test' | ||
``` | ||
|
||
- **multiple pages**—Use the following format to cache multiple pages according to a specific regular expression pattern: | ||
|
||
```terminal | ||
<entity_type>:<pattern|url>:<store_id|store_code> | ||
``` | ||
|
||
- `entity_type`: Choose `category` or `cms-page` | ||
- `pattern|url`: Use a `regexp` pattern or an exact match `url` to filter the URLs, or use an asterisk (\*) for all pages | ||
- `store_id|store_code`: Use the ID or Code of the store or an asterisk (\*) for all stores | ||
|
||
The following example caches: | ||
- all category pages for store with ID 1 | ||
- category page `cars` for store with code `store_en` | ||
- cms page `contact` for all stores | ||
- any category page that contains `car_` and ends with `html` for store with ID 2 | ||
- any category page that contains `tires_` for store with code `store_gb` | ||
|
||
```yaml | ||
stage: | ||
post-deploy: | ||
WARM_UP_PAGES: | ||
- "category:*:1" | ||
- "category:cars:store_en" | ||
- "cms-page:contact:* | ||
- "category:|car_.*?\\.html$|:2" | ||
- "category:|tires_.*|:store_gb" | ||
``` | ||
|
||
[hooks section]: {{page.baseurl}}/cloud/project/project-conf-files_magento-app.html#hooks | ||
[CMS]: https://glossary.magento.com/cms/ | ||
[Content elements]: https://docs.magento.com/m2/ce/user_guide/cms/content-elements.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.