11name : Server Perf
22
33on :
4+ pull_request :
5+ branches : [main]
6+ paths :
7+ - " .github/workflows/server-perf.yml"
8+ - " Dockerfile"
9+ - " docker-compose.yml"
10+ - " app/Support/HistoryRetentionEnforcer.php"
11+ - " app/Support/BoundedMetricPolicy.php"
12+ - " app/Support/LongPollSignalStore.php"
13+ - " app/Support/ProjectionDriftMetrics.php"
14+ - " app/Support/ServerReadiness.php"
15+ - " app/Support/ServerPollingCache.php"
16+ - " app/Support/TaskQueueAdmission.php"
17+ - " app/Support/WorkflowQueryTaskBroker.php"
18+ - " app/Support/WorkflowTaskFailureMetrics.php"
19+ - " app/Support/WorkflowTaskPoller.php"
20+ - " app/Support/WorkflowTaskPollRequestStore.php"
21+ - " app/Http/Controllers/Api/SystemController.php"
22+ - " config/dw-bounded-growth.php"
23+ - " config/server.php"
24+ - " docs/bounded-growth.md"
25+ - " routes/api.php"
26+ - " scripts/perf/**"
27+ - " tests/Unit/BoundedGrowthPolicyTest.php"
28+ - " tests/Unit/BoundedMetricPolicyTest.php"
29+ - " tests/Unit/ServerPerfHarnessContractTest.php"
30+ - " tests/Feature/SystemMetricsTest.php"
31+ push :
32+ branches : [main]
33+ paths :
34+ - " .github/workflows/server-perf.yml"
35+ - " Dockerfile"
36+ - " docker-compose.yml"
37+ - " app/Support/HistoryRetentionEnforcer.php"
38+ - " app/Support/BoundedMetricPolicy.php"
39+ - " app/Support/LongPollSignalStore.php"
40+ - " app/Support/ProjectionDriftMetrics.php"
41+ - " app/Support/ServerReadiness.php"
42+ - " app/Support/ServerPollingCache.php"
43+ - " app/Support/TaskQueueAdmission.php"
44+ - " app/Support/WorkflowQueryTaskBroker.php"
45+ - " app/Support/WorkflowTaskFailureMetrics.php"
46+ - " app/Support/WorkflowTaskPoller.php"
47+ - " app/Support/WorkflowTaskPollRequestStore.php"
48+ - " app/Http/Controllers/Api/SystemController.php"
49+ - " config/dw-bounded-growth.php"
50+ - " config/server.php"
51+ - " docs/bounded-growth.md"
52+ - " routes/api.php"
53+ - " scripts/perf/**"
54+ - " tests/Unit/BoundedGrowthPolicyTest.php"
55+ - " tests/Unit/BoundedMetricPolicyTest.php"
56+ - " tests/Unit/ServerPerfHarnessContractTest.php"
57+ - " tests/Feature/SystemMetricsTest.php"
58+ schedule :
59+ - cron : " 17 7 * * *"
460 workflow_dispatch :
61+ inputs :
62+ duration_seconds :
63+ description : " Soak duration in seconds"
64+ required : false
65+ default : " 7200"
66+ concurrency :
67+ description : " Concurrent long-poll workers"
68+ required : false
69+ default : " 24"
70+ remote_write :
71+ description : " Enable Prometheus remote_write when variables/secrets are configured"
72+ required : false
73+ type : boolean
74+ default : true
575
676permissions :
777 contents : read
@@ -13,36 +83,29 @@ concurrency:
1383jobs :
1484 contract :
1585 name : Bounded-growth contract
16- if : github.event_name == 'pull_request' || github.event_name == 'push'
1786 runs-on : ubuntu-latest
87+ if : github.event_name == 'pull_request' || github.event_name == 'push'
1888 timeout-minutes : 20
1989
2090 steps :
2191 - name : Checkout server
2292 uses : actions/checkout@v6
2393
2494 - name : Checkout workflow package
25- uses : actions/checkout@v6
26- with :
27- repository : durable-workflow/workflow
28- ref : v2
29- path : workflow-package
95+ run : git clone --depth=1 --branch v2 https://github.com/durable-workflow/workflow.git workflow-package
3096
3197 - name : Run bounded-growth contract tests
3298 run : |
33- docker run --rm \
34- -u "$(id -u):$(id -g)" \
35- -v "${PWD}:/app" \
36- -v "${PWD}/workflow-package:/workflow:ro" \
37- -w /app \
38- composer:2 \
39- sh -lc 'composer install --no-interaction --no-progress --prefer-dist && vendor/bin/phpunit tests/Unit/BoundedGrowthPolicyTest.php tests/Unit/ServerPerfHarnessContractTest.php --colors=never'
99+ # Stream sources into the test container so containerized runners avoid host bind-path assumptions.
100+ tar --exclude=.git --exclude=vendor --exclude=build -cf - . \
101+ | docker run --rm -i -w /app composer:2 \
102+ sh -lc 'tar -xf - -C /app && cp -a /app/workflow-package /workflow && composer install --no-interaction --no-progress --prefer-dist && vendor/bin/phpunit tests/Unit/BoundedGrowthPolicyTest.php tests/Unit/ServerPerfHarnessContractTest.php --colors=never'
40103
41104 smoke :
42105 name : Polling cache bounded-growth smoke
43- if : github.event_name == 'pull_request' || github.event_name == 'push'
44106 needs : contract
45107 runs-on : ubuntu-latest
108+ if : github.event_name == 'pull_request' || github.event_name == 'push'
46109 timeout-minutes : 45
47110
48111 steps :
@@ -61,13 +124,22 @@ jobs:
61124 DW_PERF_MAX_SERVER_MEMORY_MB : " 768"
62125 DW_PERF_MAX_POLLING_KEYS : " 512"
63126 DW_PERF_MAX_FINAL_POLLING_KEYS : " 0"
127+ DW_PERF_MIN_SAMPLE_COVERAGE : " 0.75"
64128 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}'
65129 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}'
66130 RUNNER_ENVIRONMENT : " github-hosted"
67131 run : scripts/perf/run-server-soak.sh
68132
69133 - name : Upload perf artifacts
70- if : always()
134+ if : always() && github.server_url == 'https://github.com'
135+ uses : actions/upload-artifact@v4
136+ with :
137+ name : server-perf-smoke
138+ path : build/perf/
139+ if-no-files-found : warn
140+
141+ - name : Upload perf artifacts on compatible Actions servers
142+ if : always() && github.server_url != 'https://github.com'
71143 uses : actions/upload-artifact@v3.2.2
72144 with :
73145 name : server-perf-smoke
76148
77149 soak :
78150 name : Self-hosted polling cache soak
79- if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
80151 runs-on : [self-hosted, linux, x64, perf-soak, server-perf]
152+ if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
81153 timeout-minutes : 390
82154
83155 steps :
@@ -105,7 +177,15 @@ jobs:
105177 run : scripts/perf/run-server-soak.sh
106178
107179 - name : Upload perf artifacts
108- if : always()
180+ if : always() && github.server_url == 'https://github.com'
181+ uses : actions/upload-artifact@v4
182+ with :
183+ name : server-perf-soak
184+ path : build/perf/
185+ if-no-files-found : warn
186+
187+ - name : Upload perf artifacts on compatible Actions servers
188+ if : always() && github.server_url != 'https://github.com'
109189 uses : actions/upload-artifact@v3.2.2
110190 with :
111191 name : server-perf-soak
0 commit comments