perf: optimize bufiox performance by nocopy write and directly read #669
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: Tests | |
| on: [ push, pull_request ] | |
| jobs: | |
| unittest: | |
| strategy: | |
| matrix: | |
| go: [ "1.20", oldstable, stable ] | |
| os: [ ubuntu-24.04-arm, ubuntu-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: true # false for self-hosted runners | |
| - name: Unit Test | |
| run: go test -race ./... | |
| benchmark: | |
| strategy: | |
| matrix: | |
| go: [ "1.20", oldstable, stable ] | |
| os: [ ubuntu-24.04-arm, ubuntu-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: true # false for self-hosted runners | |
| - name: Benchmark | |
| run: go test -bench=. -benchmem -run=none ./... -benchtime=100ms |