Repository navigation
perf: even faster trie #512
Workflow file for this run
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: Performance | |
| # This workflow is decoupled from comment-perf.yaml to protect secrets. | |
| # The benchmark test executes the chisel binary, so the PR author could execute | |
| # arbitrary code in the runner. Hence, secrets MUST NOT be available to this | |
| # workflow. | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| version: | |
| - name: base | |
| sha: ${{ github.event.pull_request.base.sha }} | |
| - name: head | |
| sha: ${{ github.event.pull_request.head.sha }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ matrix.version.sha }} | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Build | |
| run: | | |
| go build -o ${{ matrix.version.name }} ./cmd/chisel | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.version.name }} | |
| path: ${{ matrix.version.name }} | |
| benchmark-info: | |
| runs-on: ubuntu-22.04 | |
| needs: build | |
| name: Benchmark chisel info (chisel-releases 24.04) | |
| steps: | |
| - name: Download base | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: base | |
| - name: Download head | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: head | |
| - name: Download chisel-releases | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: canonical/chisel-releases | |
| ref: ubuntu-24.04 | |
| path: chisel-releases | |
| - name: Install hyperfine | |
| run: sudo apt-get install -y hyperfine | |
| - name: Run benchmark | |
| id: benchmark | |
| run: | | |
| msg_file="$(mktemp)" | |
| echo "msg_file=$msg_file" >> $GITHUB_OUTPUT | |
| chmod +x base head | |
| hyperfine --export-markdown "$msg_file" "./base info --release ./chisel-releases 'python3.12_core'" -n "BASE" "./head info --release ./chisel-releases 'python3.12_core'" -n "HEAD" | |
| - name: Upload result | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-report | |
| path: ${{ steps.benchmark.outputs.msg_file }} | |
| retention-days: 1 |