Skip to content

Benchmark

Benchmark #880

Workflow file for this run

name: Benchmark
on:
workflow_dispatch:
inputs:
hostd-version:
description: hostd commit hash or branch name to use
required: false
default: "master"
renterd-version:
description: renterd commit hash or branch name to use
required: false
default: "master"
schedule:
- cron: "0 */3 * * *"
permissions:
contents: write
pull-requests: write
jobs:
benchmark:
runs-on: linux-benchmark
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Prepare
env:
HOSTD_UPDATE_TARGET: ${{ github.event.inputs.hostd-version || 'master' }}
RENTERD_UPDATE_TARGET: ${{ github.event.inputs.renterd-version || 'master' }}
GOPRIVATE: go.sia.tech # force lookups
run: |
go get go.sia.tech/hostd@$HOSTD_UPDATE_TARGET
go get go.sia.tech/renterd@$RENTERD_UPDATE_TARGET
go mod tidy
mkdir -p results
CGO_ENABLED=1 go build -o bin/ -trimpath -a ./cmd/benchmark
git reset --hard
- name: Run RHP2
run: ./bin/benchmark -rhp2 -output results
- name: Run RHP3
run: ./bin/benchmark -rhp3 -output results
- name: Run RHP4
run: ./bin/benchmark -rhp4 -output results
- name: Run e2e
run: ./bin/benchmark -e2e -output results
- name: Generate Charts
continue-on-error: true # chromedp is unreliable in CI
run: go run ./cmd/chart -dir results
- name: Add Results
uses: peter-evans/create-pull-request@v7
id: result
with:
delete-branch: true
commit-message: Add benchmark results
title: Add benchmark results
branch: benchmark-result
labels: |
benchmark
add-paths: |
results/*.csv
results/*.png
- name: Automerge
run: gh pr merge --merge --auto "${{ steps.result.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}