Skip to content

pkg: Update build packages #3484

pkg: Update build packages

pkg: Update build packages #3484

Workflow file for this run

name: Benchmark
on:
pull_request:
branches:
- master
paths:
- 'packages/normalizr/src/**'
- 'packages/endpoint/src/schemas/**'
- 'packages/core/src/**'
- 'examples/benchmark/**'
- '.github/workflows/benchmark.yml'
push:
branches:
- master
paths:
- 'packages/normalizr/src/**'
- 'packages/endpoint/src/schemas/**'
- 'packages/core/src/**'
- 'examples/benchmark/**'
- '.github/workflows/benchmark.yml'
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.event_name == 'push' && 'gh-pages-bench-node-push' || format('benchmark-node-{0}', github.head_ref) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'yarn'
- name: Install packages
run: ./scripts/ci-install.sh examples/benchmark
- name: Build packages
run: yarn build:benchmark
- name: Tune system for benchmarking
run: |
# Pin CPU governor to performance mode (reduces frequency scaling jitter)
for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
echo performance | sudo tee "$gov" 2>/dev/null || true
done
# Disable swap to prevent memory pressure variance
sudo swapoff -a || true
- name: Run benchmark
run: taskset -c 0,1 yarn workspace example-benchmark start | tee output.txt
# PR comments on changes
- name: Store benchmark result (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: rhysd/github-action-benchmark@v1
with:
tool: 'benchmarkjs'
output-file-path: output.txt
github-token: "${{ secrets.GITHUB_TOKEN }}"
gh-pages-branch: 'gh-pages-bench'
alert-threshold: '150%'
comment-always: true
fail-on-alert: false
alert-comment-cc-users: '@ntucker'
save-data-file: false
auto-push: false
# master reports to history
- name: Store benchmark result (main)
if: ${{ github.event_name == 'push' }}
uses: rhysd/github-action-benchmark@v1
with:
tool: 'benchmarkjs'
output-file-path: output.txt
github-token: "${{ secrets.GITHUB_TOKEN }}"
gh-pages-branch: 'gh-pages-bench'
auto-push: true
fail-on-alert: false