Performance testing
When performance testing edge meshes on API Mesh for Adobe Developer App Builder, you need to account for cold starts to get an accurate measurement of the performance.
If your mesh existed before the September 24, 2024 release, you must run the aio api-mesh update
command on your edge mesh before you can benefit from this enhancement.
If applicable, you should use the Connection: keep-alive
header described in Optimizing edge mesh performance.
Additionally, you can prime your mesh by making several repeated calls to the mesh that do not make calls to your sources. This is also useful for increasing performance using cURL or other tools that do not support the keep-alive
header.
If you are using the Connection: keep-alive
header, you only need to prime with one or two calls before testing.
If you are not using the keep-alive
header, you can prime your mesh by repeating the following query 100-200 times before performance testing:
Copied to your clipboard{__schema {queryType {name}}}
Schedule performance testing
After creating a local environment, you can enable scheduled performance testing in GitHub.
To add variables, you must have administrative permissions in the target GitHub repository.
In your browser, navigate to
https://github.com/<org>/<project_name>/settings/variables/actions
.On the Variables tab, click New repository variable.
Enter a name for the variable, such as
DURATION
.Enter the corresponding value for the variable, for example,
600
.Repeat this process for all the following variables:
VUS
- The number of virtual users for the test scenario.DURATION
- The number of seconds to run the test scenario.UPLOAD_REPORT
- Boolean to control uploading the report to your GitHub repository.MESH_ENDPOINT
- The URL of your edge mesh.
You can run the action manually from the Actions tab in your GitHub repository, or you can use a schedule event.
Local performance testing
You can create a performance testing report locally, by running the following command:
Copied to your clipboardK6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_EXPORT=<FILENAME>.html yarn test:perf