Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,18 @@
with:
mode: memory
config: .github/test-codspeed.yml

test-simulation-tuning-inputs:
runs-on: ubuntu-latest
env:
CODSPEED_SKIP_UPLOAD: true
steps:
- uses: actions/checkout@v4
- name: Check action with cycle-estimation and exclude-allocations
uses: ./
with:
allow-empty: true
mode: simulation
cycle-estimation: "false"
exclude-allocations: "true"
run: echo "Testing simulation tuning inputs!"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +167 to +179
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ GitHub Actions for running [CodSpeed](https://codspeed.io) in your CI.
# [OPTIONAL]
# The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed
go-runner-version: ""

# [OPTIONAL]
# Improve `simulation` accuracy by weighting each instruction by its estimated cycle
# cost instead of charging every instruction the same fixed cost.
# Set to "false" to disable. Requires runner v5 or later.
# Defaults to "true".
cycle-estimation: ""

# [OPTIONAL]
# Exclude memory allocation time from `simulation` mode results. Set to "true" to
# enable. Requires runner v5 or later.
# Defaults to "false".
exclude-allocations: ""
```

# Example usage
Expand Down
19 changes: 19 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ inputs:
description: "The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed"
required: false

cycle-estimation:
description: |
Improve `simulation` accuracy by weighting each instruction by its estimated cycle cost instead of
charging every instruction the same fixed cost. Set to 'false' to disable.
Requires runner v5 or later. Defaults to 'true'.
required: false

exclude-allocations:
description: |
Exclude memory allocation time from `simulation` mode results. Set to 'true' to enable.
Requires runner v5 or later. Defaults to 'false'.
required: false

config:
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."
required: false
Expand Down Expand Up @@ -263,6 +276,12 @@ runs:
if [ -n "${{ inputs.config }}" ]; then
RUNNER_ARGS+=(--config="${{ inputs.config }}")
fi
if [ -n "${{ inputs.cycle-estimation }}" ]; then
RUNNER_ARGS+=(--cycle-estimation="${{ inputs.cycle-estimation }}")
fi
if [ -n "${{ inputs.exclude-allocations }}" ]; then
RUNNER_ARGS+=(--exclude-allocations="${{ inputs.exclude-allocations }}")
fi

if [ -n "$CODSPEED_INPUT_RUN" ]; then
RUNNER_ARGS+=(-- "$CODSPEED_INPUT_RUN")
Expand Down
Loading