|
1 | 1 | name: Run Load Tests |
2 | 2 | permissions: |
3 | 3 | pull-requests: write |
4 | | - contents: read |
| 4 | + contents: write |
5 | 5 | packages: read |
6 | 6 |
|
7 | 7 | on: |
@@ -127,14 +127,41 @@ jobs: |
127 | 127 | metrics_p50.png |
128 | 128 | metrics_p95.png |
129 | 129 |
|
| 130 | + - name: Push Graphs to Branch |
| 131 | + if: github.event_name == 'pull_request' |
| 132 | + id: push-graphs |
| 133 | + run: | |
| 134 | + SERVER="${{ matrix.server }}" |
| 135 | + BRANCH="ci-load-test-pr-${{ github.event.pull_request.number }}-${SERVER//./-}" |
| 136 | + REPO="${{ github.repository }}" |
| 137 | +
|
| 138 | + mkdir -p /tmp/graph-upload |
| 139 | + cp metrics_p50.png metrics_p95.png /tmp/graph-upload/ |
| 140 | +
|
| 141 | + cd /tmp/graph-upload |
| 142 | + git init |
| 143 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 144 | + git config user.name "github-actions[bot]" |
| 145 | + git add . |
| 146 | + git commit -m "Load test graphs for $SERVER" |
| 147 | + git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$REPO.git" HEAD:refs/heads/$BRANCH --force |
| 148 | +
|
| 149 | + echo "p50-url=https://raw.githubusercontent.com/$REPO/$BRANCH/metrics_p50.png" >> $GITHUB_OUTPUT |
| 150 | + echo "p95-url=https://raw.githubusercontent.com/$REPO/$BRANCH/metrics_p95.png" >> $GITHUB_OUTPUT |
| 151 | +
|
130 | 152 | - name: Post Graphs to PR |
131 | 153 | uses: thollander/actions-comment-pull-request@v2 |
132 | 154 | if: github.event_name == 'pull_request' |
133 | 155 | with: |
134 | 156 | comment_tag: perf-report-${{ matrix.server }} |
135 | 157 | message: | |
136 | | - ### 📊 Performance Metrics Report ${{ matrix.server }} |
137 | | - [View Performance Graphs](${{ steps.upload-graphs.outputs.artifact-url }}) |
| 158 | + ### Performance Metrics Report ${{ matrix.server }} |
| 159 | +
|
| 160 | + **P50 Latency:** |
| 161 | +  |
| 162 | +
|
| 163 | + **P95 Latency:** |
| 164 | +  |
138 | 165 |
|
139 | 166 | - name: Collect couchbase logs |
140 | 167 | timeout-minutes: 10 |
|
0 commit comments