Skip to content

Pbeslin/parse mcp history #2910

Pbeslin/parse mcp history

Pbeslin/parse mcp history #2910

Workflow file for this run

name: Performance benchmark
on:
pull_request:
workflow_dispatch:
inputs:
run_options:
description: 'Additional options to pass to `run`'
python_version:
description: 'Python version to use (use https://github.com/actions/setup-python#supported-version-syntax)'
default: '3.10'
env:
UV_VERSION: 0.10.8
DEFAULT_PYTHON_VERSION: '3.10'
jobs:
benchmark:
name: Run performance benchmark
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-22.04
env:
PYTHONUNBUFFERED: 1
# How many times to repeat each run
REPEATS: 3
# If a run takes more than $MAX_DELTA seconds compared to reference, fail the job
MAX_DELTA: 3
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ inputs.python_version || env.DEFAULT_PYTHON_VERSION }}
- name: Install dependencies
run: |
uv sync --locked --no-dev
- name: Setup benchmark
run: |
scripts/perfbench/perfbench setup
- name: Run benchmark
env:
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
run: |
scripts/perfbench/perfbench run --repeats $REPEATS ${{ inputs.run_options }}
- name: Generate report
run: |
scripts/perfbench/perfbench report --max-delta $MAX_DELTA >> $GITHUB_STEP_SUMMARY