perf: optimize V8 engine by eliminating redundant instantiation #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmarks | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'src/rules/**' | |
| - 'benches/**' | |
| - '.github/workflows/benchmark.yml' | |
| 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 |