-
Notifications
You must be signed in to change notification settings - Fork 0
183 lines (167 loc) · 7.24 KB
/
server-perf.yml
File metadata and controls
183 lines (167 loc) · 7.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Server Perf
on:
pull_request:
branches: [main]
paths:
- ".github/workflows/server-perf.yml"
- "Dockerfile"
- "docker-compose.yml"
- "app/Support/HistoryRetentionEnforcer.php"
- "app/Support/BoundedMetricPolicy.php"
- "app/Support/LongPollSignalStore.php"
- "app/Support/ProjectionDriftMetrics.php"
- "app/Support/ServerReadiness.php"
- "app/Support/ServerPollingCache.php"
- "app/Support/TaskQueueAdmission.php"
- "app/Support/WorkflowQueryTaskBroker.php"
- "app/Support/WorkflowTaskFailureMetrics.php"
- "app/Support/WorkflowTaskPoller.php"
- "app/Support/WorkflowTaskPollRequestStore.php"
- "app/Http/Controllers/Api/SystemController.php"
- "config/dw-bounded-growth.php"
- "config/server.php"
- "docs/bounded-growth.md"
- "routes/api.php"
- "scripts/perf/**"
- "tests/Unit/BoundedGrowthPolicyTest.php"
- "tests/Unit/BoundedMetricPolicyTest.php"
- "tests/Unit/ServerPerfHarnessContractTest.php"
- "tests/Feature/SystemMetricsTest.php"
push:
branches: [main]
paths:
- ".github/workflows/server-perf.yml"
- "Dockerfile"
- "docker-compose.yml"
- "app/Support/HistoryRetentionEnforcer.php"
- "app/Support/BoundedMetricPolicy.php"
- "app/Support/LongPollSignalStore.php"
- "app/Support/ProjectionDriftMetrics.php"
- "app/Support/ServerReadiness.php"
- "app/Support/ServerPollingCache.php"
- "app/Support/TaskQueueAdmission.php"
- "app/Support/WorkflowQueryTaskBroker.php"
- "app/Support/WorkflowTaskFailureMetrics.php"
- "app/Support/WorkflowTaskPoller.php"
- "app/Support/WorkflowTaskPollRequestStore.php"
- "app/Http/Controllers/Api/SystemController.php"
- "config/dw-bounded-growth.php"
- "config/server.php"
- "docs/bounded-growth.md"
- "routes/api.php"
- "scripts/perf/**"
- "tests/Unit/BoundedGrowthPolicyTest.php"
- "tests/Unit/BoundedMetricPolicyTest.php"
- "tests/Unit/ServerPerfHarnessContractTest.php"
- "tests/Feature/SystemMetricsTest.php"
schedule:
- cron: "17 7 * * *"
workflow_dispatch:
inputs:
duration_seconds:
description: "Soak duration in seconds"
required: false
default: "7200"
concurrency:
description: "Concurrent long-poll workers"
required: false
default: "24"
remote_write:
description: "Enable Prometheus remote_write when variables/secrets are configured"
required: false
type: boolean
default: true
permissions:
contents: read
concurrency:
group: server-perf-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: false
jobs:
contract:
name: Bounded-growth contract
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout server
uses: actions/checkout@v6
- name: Checkout workflow package
uses: actions/checkout@v6
with:
repository: durable-workflow/workflow
ref: v2
path: workflow-package
- name: Run bounded-growth contract tests
run: |
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "${PWD}:/app" \
-v "${PWD}/workflow-package:/workflow:ro" \
-w /app \
composer:2 \
sh -lc 'composer install --no-interaction --no-progress --prefer-dist && vendor/bin/phpunit tests/Unit/BoundedGrowthPolicyTest.php tests/Unit/ServerPerfHarnessContractTest.php --colors=never'
smoke:
name: Polling cache bounded-growth smoke
if: github.event_name == 'pull_request' || github.event_name == 'push'
needs: contract
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout server
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Run short perf smoke
env:
DW_PERF_DURATION_SECONDS: "120"
DW_PERF_CONCURRENCY: "8"
DW_PERF_NAMESPACES: "4"
DW_PERF_TASK_QUEUES: "8"
DW_PERF_MAX_SERVER_MEMORY_MB: "768"
DW_PERF_MAX_POLLING_KEYS: "512"
DW_PERF_MAX_FINAL_POLLING_KEYS: "0"
DW_PERF_MAX_SERVER_CACHE_KEYS_BY_POLICY: '{"workflow_task_poll_requests":512,"long_poll_signals":512,"workflow_query_tasks":64,"task_queue_admission_locks":128,"task_queue_dispatch_counters":128,"workflow_task_expired_lease_recovery":128,"history_retention_inline":64,"readiness_probe":16}'
DW_PERF_MAX_FINAL_SERVER_CACHE_KEYS_BY_POLICY: '{"workflow_task_poll_requests":0,"long_poll_signals":0,"workflow_query_tasks":0,"task_queue_admission_locks":0,"task_queue_dispatch_counters":0,"workflow_task_expired_lease_recovery":0,"history_retention_inline":0,"readiness_probe":0}'
RUNNER_ENVIRONMENT: "github-hosted"
run: scripts/perf/run-server-soak.sh
- name: Upload perf artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: server-perf-smoke
path: build/perf/
if-no-files-found: warn
soak:
name: Self-hosted polling cache soak
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: [self-hosted, linux, x64, perf-soak, server-perf]
timeout-minutes: 390
steps:
- name: Checkout server
uses: actions/checkout@v6
- name: Run long perf soak
env:
DW_PERF_DURATION_SECONDS: ${{ github.event_name == 'workflow_dispatch' && inputs.duration_seconds || '7200' }}
DW_PERF_CONCURRENCY: ${{ github.event_name == 'workflow_dispatch' && inputs.concurrency || '24' }}
DW_PERF_NAMESPACES: "8"
DW_PERF_TASK_QUEUES: "16"
DW_PERF_MAX_SERVER_MEMORY_MB: "1024"
DW_PERF_MAX_POLLING_KEYS: "2048"
DW_PERF_MAX_FINAL_POLLING_KEYS: "0"
DW_PERF_MAX_SERVER_CACHE_KEYS_BY_POLICY: '{"workflow_task_poll_requests":2048,"long_poll_signals":2048,"workflow_query_tasks":128,"task_queue_admission_locks":256,"task_queue_dispatch_counters":256,"workflow_task_expired_lease_recovery":256,"history_retention_inline":128,"readiness_probe":32}'
DW_PERF_MAX_FINAL_SERVER_CACHE_KEYS_BY_POLICY: '{"workflow_task_poll_requests":0,"long_poll_signals":0,"workflow_query_tasks":0,"task_queue_admission_locks":0,"task_queue_dispatch_counters":0,"workflow_task_expired_lease_recovery":0,"history_retention_inline":0,"readiness_probe":0}'
DW_PERF_MAX_SERVER_MEMORY_SLOPE_MB_HOUR: "128"
DW_PERF_REQUIRE_TRUSTED_EVIDENCE: "true"
DW_PERF_REMOTE_WRITE_ENABLED: ${{ github.event_name != 'workflow_dispatch' || inputs.remote_write }}
DW_PERF_REMOTE_WRITE_URL: ${{ vars.DW_PERF_REMOTE_WRITE_URL }}
DW_PERF_REMOTE_WRITE_USERNAME: ${{ vars.DW_PERF_REMOTE_WRITE_USERNAME }}
DW_PERF_REMOTE_WRITE_PASSWORD: ${{ secrets.DW_PERF_REMOTE_WRITE_PASSWORD }}
RUNNER_ENVIRONMENT: "self-hosted"
run: scripts/perf/run-server-soak.sh
- name: Upload perf artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: server-perf-soak
path: build/perf/
if-no-files-found: warn