httpjail 0.6.2

Monitor and restrict HTTP/HTTPS requests from processes
Documentation
name: Benchmarks

on:
  workflow_dispatch:
  push:
    branches:
      - 'bench/**'
  pull_request:
    branches:
      - 'bench/**'

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  benchmark:
    runs-on: ubuntu-latest-8-cores
    
    steps:
    - uses: actions/checkout@v4
    
    - name: Install Rust
      uses: dtolnay/rust-toolchain@stable
      with:
        toolchain: stable
    
    - name: Setup Rust cache
      uses: Swatinem/rust-cache@v2
      with:
        shared-key: ${{ runner.os }}
        # Share cache with other Linux workflows
        cache-on-failure: true
        # Cache benchmark-specific dependencies
        cache-targets: true
        cache-all-crates: true
    
    - name: Build benchmarks first (populates cache)
      run: cargo build --release --bench rule_engines
    
    - name: Run benchmarks
      run: cargo bench --bench rule_engines
    
    - name: Upload benchmark results
      uses: actions/upload-artifact@v4
      with:
        name: benchmark-results
        path: target/criterion/
        retention-days: 30