Ignore zero-length preloaded trace sections #1466
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmark Instructions | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| post-instructions: | |
| name: Post benchmark instructions | |
| if: github.event_name != 'pull_request_target' || !startsWith(github.event.pull_request.head.ref, 'version-bumps/') | |
| 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-long [benchmark.sh args...]", | |
| "/benchmark-all", | |
| "/benchmark --same-machine", | |
| "/benchmark-all --same-machine", | |
| "```", | |
| "", | |
| "Comment `/benchmark` to run the default dataset, or append any arguments accepted by `./benchmark.sh`.", | |
| "Comment `/benchmark-long` for an 8-vCPU run that defaults to 8 workers and has an eight-hour timeout.", | |
| "Comment exactly `/benchmark-all` to start separate workflow runs and result comments for the default dataset plus srj18, srj19, srj20, srj21, and srj23.", | |
| "Append `--same-machine` to `/benchmark` or `/benchmark-all` to compare current main and the PR head sequentially on the same 8-vCPU Blacksmith runner.", | |
| "", | |
| "Everything after `/benchmark` or `/benchmark-long` is safely forwarded to `./benchmark.sh`, except `--profile-solvers`, which enables profile comparison tables, and `--same-machine`, which enables the paired runner.", | |
| "Examples: `/benchmark --dataset 18 --sample-timeout 2000s`, `/benchmark --pipeline 10 --dataset 29`, `/benchmark --pipeline 10 --dataset 29 --sample 1`, `/benchmark --pipeline 7 --limit 20`, `/benchmark all 20 --concurrency 8`, `/benchmark --same-machine`, `/benchmark-all --same-machine`, and `/benchmark-long --dataset 18`.", | |
| "", | |
| "Use `/update-snapshots` (or `/us`) to run `BUN_UPDATE_SNAPSHOTS=1 bun test --timeout 120_000` on the PR branch and auto-commit snapshot updates.", | |
| "Use `/usf` to read recent failed test files, update and verify their exact CI test shards, and auto-commit only their snapshots. It uses the configured fast benchmark runner by default; use `/usf --ubuntu-latest` for GitHub-hosted x64 CI parity.", | |
| "", | |
| "Any PR whose title contains `[BENCHMARK TEST]` will automatically run one default-dataset benchmark on PR updates; it does not post a PR result comment.", | |
| ].join("\n") | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body, | |
| }) |