Skip to content

fix: optimize read-inline-info #33

fix: optimize read-inline-info

fix: optimize read-inline-info #33

Workflow file for this run

name: CodSpeed Benchmarks
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
benchmarks:
runs-on: codspeed-macro
strategy:
matrix:
# IMPORTANT: The binary has to match the architecture of the runner!
benchmark:
- testdata/take_strings-aarch64
valgrind:
- /usr/bin/valgrind
- ../vg-in-place
steps:
- uses: actions/checkout@v4
with:
lfs: true
# Skip installing package docs to avoid wasting time when installing build dependencies
# See: https://github.com/actions/runner-images/issues/10977#issuecomment-2810713336
- name: Skip installing package docs
if: runner.os == 'Linux'
run: |
sudo tee /etc/dpkg/dpkg.cfg.d/01_nodoc > /dev/null << 'EOF'
path-exclude /usr/share/doc/*
path-exclude /usr/share/man/*
path-exclude /usr/share/info/*
EOF
# Build and install Valgrind
- name: Update apt-get cache
run: sudo apt-get update
# Install upstream Valgrind for comparison
- name: Install upstream Valgrind
run: |
sudo apt-get install -y valgrind
which valgrind
valgrind --version
- name: Install build dependencies
run: |
sudo apt-get install -y \
build-essential \
automake \
autoconf \
libc6-dev \
gdb \
docbook \
docbook-xsl \
docbook-xml \
xsltproc
- name: Run autogen
run: ./autogen.sh
- name: Configure
run: ./configure
- name: Build Valgrind
run: |
make -j$(nproc)
- name: Verify Valgrind build
run: |
# Verify that vg-in-place script exists
test -f ./vg-in-place || { echo "vg-in-place not found!"; exit 1; }
# Test valgrind works with vg-in-place
./vg-in-place --version
./vg-in-place --tool=callgrind --help > /dev/null || { echo "callgrind tool not accessible!"; exit 1; }
echo "Valgrind build successful and callgrind tool is accessible"
# Setup benchmarks and run them
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run the benchmarks
uses: CodSpeedHQ/action@main
env:
# We currently don't support sub-processes in benchmarks, since we cannot find the
# benchmark root frame when using the process with most samples.
CODSPEED_PERF_ENABLED: false
with:
cache-instruments: false
working-directory: bench
mode: walltime
run: uv run bench.py --binary-path ${{ matrix.benchmark }} --valgrind-path ${{ matrix.valgrind }}