mrrc 0.8.2

A Rust library for reading, writing, and manipulating MARC bibliographic records in ISO 2709 binary format
Documentation
name: "Benchmarks: Rust"

on:
  push:
    branches:
      - main
    paths-ignore:
      - '**.md'
      - 'docs/**'
      - 'mkdocs.yml'
      - 'LICENSE'
      - '.gitignore'
      - '.beads/**'
  pull_request:
    paths-ignore:
      - '**.md'
      - 'docs/**'
      - 'mkdocs.yml'
      - 'LICENSE'
      - '.gitignore'
      - '.beads/**'
  workflow_dispatch:

permissions:
  contents: read
  id-token: write

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  benchmarks:
    name: Run benchmarks
    runs-on: ubuntu-latest
    timeout-minutes: 30
    # Dependency bumps don't need the CodSpeed perf gate; skip for dependabot.
    if: github.actor != 'dependabot[bot]'
    steps:
      - uses: actions/checkout@v6.0.3

      - name: Setup Rust toolchain
        uses: moonrepo/setup-rust@v1
        with:
          channel: stable
          cache-target: release
          bins: cargo-codspeed

      - name: Build benchmarks
        # Allowlist the single-threaded criterion benches. parallel_benchmarks
        # is excluded: Valgrind serializes threads under simulation mode, so
        # rayon speedup cannot be measured there (its sequential baselines
        # duplicate marc_benchmarks' read_* coverage). Run it locally with
        # criterion for real walltime numbers. The remaining bench targets are
        # print-only profiling harnesses that produce no CodSpeed signal.
        run: cargo codspeed build --bench marc_benchmarks --bench error_handling_benchmarks

      - name: Run benchmarks
        uses: CodSpeedHQ/action@v4.17.0
        with:
          run: cargo codspeed run
          mode: simulation