Skip to content
Merged
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
48 changes: 48 additions & 0 deletions .github/workflows/benchmark-instructions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Benchmark Instructions

on:
pull_request_target:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
post-instructions:
name: Post benchmark instructions
runs-on: ubuntu-latest
steps:
- name: Comment benchmark usage
uses: actions/github-script@v7
with:
github-token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
script: |
const body = [
"## Benchmark This PR",
"",
"Run benchmarks by commenting on this PR:",
"",
"```",
"/benchmark [benchmark.sh args...]",
"/benchmark [scenario-limit|all] --concurrency <n> --effort <n> --max-iterations <n>",
"```",
"",
"Everything after `/benchmark` is forwarded directly to `./benchmark.sh`.",
"",
"Examples:",
"- `/benchmark` -> run default DRC14 benchmark settings",
"- `/benchmark 10` -> run first 10 DRC14 samples",
"- `/benchmark all --concurrency 4` -> run all DRC14 samples with 4 workers",
"- `/benchmark --scenario-limit all --effort 2` -> run all samples with effort 2",
"- `/benchmark --scenario-limit 20 --max-iterations 100` -> run 20 samples with a max iteration override",
"",
"Any PR whose title contains `[BENCHMARK TEST]` will automatically run the benchmark workflow on PR updates.",
].join("\n")

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body,
})
Loading
Loading