name: Perf

# Diagnostic tooling only — never a correctness gate. Unlike ci.yml/e2e,
# this never runs on push/PR; it's manually triggered when someone wants a
# fresh coverage+profiling snapshot of mcpify's own codebase to hand to a
# tool or LLM for bottleneck analysis. See docs/profiling.md.

on:
  workflow_dispatch:

jobs:
  bottleneck-report:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview
      - uses: Swatinem/rust-cache@v2
      - run: cargo install cargo-llvm-cov samply
      - run: ./scripts/bottleneck-report.sh
      - uses: actions/upload-artifact@v7
        with:
          name: mcpify-bottleneck-report
          path: |
            target/bottleneck-report.md
            target/coverage/
            target/profile/
