Skip to content

Commit 22d40ad

Browse files
adriencacciaclaude
andauthored
feat: add simulation-track-subprocess input (#235)
Expose the runner's --simulation-track-subprocess flag, which measures the subprocesses spawned by the benchmarked process in simulation mode. Without it the flag was only reachable through the CODSPEED_SIMULATION_TRACK_SUBPROCESS environment variable. Co-authored-by: Claude <[email protected]>
1 parent 47f7ceb commit 22d40ad

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,12 @@ jobs:
172172
CODSPEED_SKIP_UPLOAD: true
173173
steps:
174174
- uses: actions/checkout@v4
175-
- name: Check action with cycle-estimation and exclude-allocations
175+
- name: Check action with cycle-estimation, exclude-allocations and simulation-track-subprocess
176176
uses: ./
177177
with:
178178
allow-empty: true
179179
mode: simulation
180180
cycle-estimation: "false"
181181
exclude-allocations: "true"
182+
simulation-track-subprocess: "true"
182183
run: echo "Testing simulation tuning inputs!"

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ GitHub Actions for running [CodSpeed](https://codspeed.io) in your CI.
9191
# enable. Requires runner v5 or later.
9292
# Defaults to "false".
9393
exclude-allocations: ""
94+
95+
# [OPTIONAL]
96+
# Measure the subprocesses spawned by the benchmarked process in `simulation` mode.
97+
# Set to "true" to enable. Requires runner v5.2.0 or later.
98+
# Defaults to "false".
99+
simulation-track-subprocess: ""
94100
```
95101
96102
# Example usage

‎action.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ inputs:
9191
Requires runner v5 or later. Defaults to 'false'.
9292
required: false
9393

94+
simulation-track-subprocess:
95+
description: |
96+
Measure the subprocesses spawned by the benchmarked process in `simulation` mode. Set to 'true' to enable.
97+
Requires runner v5.2.0 or later. Defaults to 'false'.
98+
required: false
99+
94100
config:
95101
description: "Path to a CodSpeed configuration file (codspeed.yml). If not specified, the runner will look for a codspeed.yml file in the repository root."
96102
required: false
@@ -292,6 +298,9 @@ runs:
292298
if [ -n "${{ inputs.exclude-allocations }}" ]; then
293299
RUNNER_ARGS+=(--exclude-allocations="${{ inputs.exclude-allocations }}")
294300
fi
301+
if [ "${{ inputs.simulation-track-subprocess }}" = "true" ]; then
302+
RUNNER_ARGS+=(--simulation-track-subprocess)
303+
fi
295304
296305
if [ -n "$CODSPEED_INPUT_RUN" ]; then
297306
RUNNER_ARGS+=(-- "$CODSPEED_INPUT_RUN")

0 commit comments

Comments
 (0)