#16 Add a performance test app to an existing project
Prerequisites: A completed scenario 1
-
On github.com, open Actions on your solution, select Create a new performance test app and then choose Run workflow. Enter values for name, publisher, and ID range and choose Run workflow
Note that if workflows are not allowed to create pull requests due to GitHub Settings, you can create the PR manually by following the link in the annotation
-
When the workflow is done, navigate to Pull Requests, inspect the PR and Merge the pull request
-
Under Actions, you will see that a Merge pull request CI/CD workflow has been kicked off
-
If you wait for the workflow to complete, you will see that it completes and one of the build artifacts are the BCPT Test Results
-
Opening the BCPT Test Results and inspecting the results looks like this
-
Scrolling down further reveals the Performance Test Results in a table, which also indicates that if we want to set a baseline for comparing future BCPT Test Results, we need to add a
bcptBaseLine.json
file in the project folder. -
After uploading a
bcptBaseLine.json
, to the project root (which is the repo root in single project repositories), another CI/CD workflow will be kicked off, which now compares the results with the baseline:Where negative numbers in the diff fields indicates faster execution or lower number of SQL statements than the baseline.
[!NOTE]
You can specify thresholds for performance testing in project settings (see https://aka.ms/algosettings#bcptThresholds) or in a file called
bcptThresholds.json
, which should be located next to thebcptBaseLine.json
file.
-
After uploading a
bcptThresholds.json
file with this content:{ "durationWarning": 0, "durationError": 1 }
The CI/CD workflow now uses these thresholds for the CI/CD run: