|
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: |
@@ -71,12 +71,10 @@ jobs: |
71 | 71 | run: | |
72 | 72 | cat > direct_config.toml << EOF |
73 | 73 | connstr = "couchbase://${{ steps.start-cluster.outputs.node-ip }}" |
74 | | - num-users = [25, 50, 100, 200, 400] |
75 | | - sleep = "100ms" |
| 74 | + num-users = [125, 250, 500, 1000, 2000] |
76 | 75 | ramp-time = "10s" |
77 | 76 | run-time = "30s" |
78 | 77 | workload = "user-profile" |
79 | | - sleep = "1s" |
80 | 78 | tls-skip-verify = true |
81 | 79 | bucket = "default" |
82 | 80 | scope = "_default" |
@@ -127,14 +125,41 @@ jobs: |
127 | 125 | metrics_p50.png |
128 | 126 | metrics_p95.png |
129 | 127 |
|
| 128 | + - name: Push Graphs to Branch |
| 129 | + if: github.event_name == 'pull_request' |
| 130 | + id: push-graphs |
| 131 | + run: | |
| 132 | + SERVER="${{ matrix.server }}" |
| 133 | + BRANCH="ci-load-test-pr-${{ github.event.pull_request.number }}-${SERVER//./-}" |
| 134 | + REPO="${{ github.repository }}" |
| 135 | +
|
| 136 | + mkdir -p /tmp/graph-upload |
| 137 | + cp metrics_p50.png metrics_p95.png /tmp/graph-upload/ |
| 138 | +
|
| 139 | + cd /tmp/graph-upload |
| 140 | + git init |
| 141 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 142 | + git config user.name "github-actions[bot]" |
| 143 | + git add . |
| 144 | + git commit -m "Load test graphs for $SERVER" |
| 145 | + git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$REPO.git" HEAD:refs/heads/$BRANCH --force |
| 146 | +
|
| 147 | + echo "p50-url=https://raw.githubusercontent.com/$REPO/$BRANCH/metrics_p50.png" >> $GITHUB_OUTPUT |
| 148 | + echo "p95-url=https://raw.githubusercontent.com/$REPO/$BRANCH/metrics_p95.png" >> $GITHUB_OUTPUT |
| 149 | +
|
130 | 150 | - name: Post Graphs to PR |
131 | 151 | uses: thollander/actions-comment-pull-request@v2 |
132 | 152 | if: github.event_name == 'pull_request' |
133 | 153 | with: |
134 | 154 | comment_tag: perf-report-${{ matrix.server }} |
135 | 155 | message: | |
136 | | - ### 📊 Performance Metrics Report ${{ matrix.server }} |
137 | | - [View Performance Graphs](${{ steps.upload-graphs.outputs.artifact-url }}) |
| 156 | + ### Performance Metrics Report ${{ matrix.server }} |
| 157 | +
|
| 158 | + **P50 Latency:** |
| 159 | +  |
| 160 | +
|
| 161 | + **P95 Latency:** |
| 162 | +  |
138 | 163 |
|
139 | 164 | - name: Collect couchbase logs |
140 | 165 | timeout-minutes: 10 |
|
0 commit comments