Add RequestResult.first_byte
field for measuring first body byte latency
#121
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: Publish PGO | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*.*.*" | |
pull_request: | |
jobs: | |
publish: | |
name: Publish for ${{ matrix.target }} PGO | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: oha | |
release_name: oha-linux-amd64-pgo | |
target: x86_64-unknown-linux-musl | |
additional_args: "--features vsock" | |
- os: windows-latest | |
artifact_name: oha.exe | |
release_name: oha-windows-amd64-pgo.exe | |
target: x86_64-pc-windows-msvc | |
additional_args: "" | |
# - os: macos-latest | |
# artifact_name: oha | |
# release_name: oha-macos-amd64-pgo | |
# target: x86_64-apple-darwin | |
# additional_args: "" | |
# - os: macos-14 | |
# artifact_name: oha | |
# release_name: oha-macos-arm64-pgo | |
# target: aarch64-apple-darwin | |
# additional_args: "" | |
steps: | |
- uses: ilammy/setup-nasm@v1 | |
- uses: actions/checkout@v4 | |
- name: Install musl-tools on Linux | |
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | |
if: contains(matrix.target, 'musl') | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
components: llvm-tools-preview | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo install cargo-pgo --version 0.2.8 | |
- uses: oven-sh/setup-bun@v2 | |
- run: bun run pgo.js --target ${{ matrix.target }} ${{ matrix.additional_args }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.release_name }} | |
path: target/${{ matrix.target }}/pgo/${{ matrix.artifact_name }} | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/${{ matrix.target }}/pgo/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.release_name }} | |
tag: ${{ github.ref }} |