Skip to content

Commit ad56e14

Browse files
committed
Allow configuring RAILS_MAX/MIN_THREADS in the workflow
1 parent 7e4dc54 commit ad56e14

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/benchmark.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@ on:
3636
web_concurrency:
3737
description: 'Number of Puma worker processes'
3838
required: false
39-
default: 2
39+
default: 4
40+
type: number
41+
rails_max_threads:
42+
description: 'Maximum number of Puma threads'
43+
required: false
44+
default: 3
45+
type: number
46+
rails_min_threads:
47+
description: 'Minimum number of Puma threads (same as maximum if not set)'
48+
required: false
4049
type: number
4150
tools:
4251
description: 'Comma-separated list of tools to run'
@@ -58,7 +67,9 @@ env:
5867
REQUEST_TIMEOUT: ${{ github.event.inputs.request_timeout || '60s' }}
5968
CONNECTIONS: ${{ github.event.inputs.connections || '10' }}
6069
MAX_CONNECTIONS: ${{ github.event.inputs.max_connections || github.event.inputs.connections || '10' }}
61-
WEB_CONCURRENCY: ${{ github.event.inputs.web_concurrency || '2' }}
70+
WEB_CONCURRENCY: ${{ github.event.inputs.web_concurrency || '4' }}
71+
RAILS_MAX_THREADS: ${{ github.event.inputs.rails_max_threads || '3' }}
72+
RAILS_MIN_THREADS: ${{ github.event.inputs.rails_min_threads || github.event.inputs.rails_max_threads || '3' }}
6273
TOOLS: ${{ github.event.inputs.tools || 'fortio,vegeta,k6' }}
6374

6475
jobs:
@@ -269,6 +280,8 @@ jobs:
269280
echo " - CONNECTIONS: ${CONNECTIONS}"
270281
echo " - MAX_CONNECTIONS: ${MAX_CONNECTIONS}"
271282
echo " - WEB_CONCURRENCY: ${WEB_CONCURRENCY}"
283+
echo " - RAILS_MAX_THREADS: ${RAILS_MAX_THREADS}"
284+
echo " - RAILS_MIN_THREADS: ${RAILS_MIN_THREADS}"
272285
echo " - TOOLS: ${TOOLS}"
273286
echo ""
274287

0 commit comments

Comments
 (0)