diff --git a/.github/workflows/performance-monitor.yml b/.github/workflows/performance-monitor.yml index 4772a3cdd..da970e6c1 100644 --- a/.github/workflows/performance-monitor.yml +++ b/.github/workflows/performance-monitor.yml @@ -9,7 +9,7 @@ on: iterations: description: "Number of iterations per metric" required: false - default: "5" + default: "30" permissions: contents: read @@ -19,7 +19,7 @@ jobs: benchmark: name: Run Performance Benchmarks runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 90 steps: - name: Checkout uses: actions/checkout@v4 @@ -46,6 +46,8 @@ jobs: - name: Run benchmarks id: benchmark + env: + AWF_BENCHMARK_ITERATIONS: ${{ github.event.inputs.iterations || '30' }} run: | npx tsx scripts/ci/benchmark-performance.ts > benchmark-results.json 2>benchmark-progress.log || true cat benchmark-progress.log diff --git a/scripts/ci/benchmark-performance.ts b/scripts/ci/benchmark-performance.ts index 414b62aee..8afd97672 100644 --- a/scripts/ci/benchmark-performance.ts +++ b/scripts/ci/benchmark-performance.ts @@ -20,7 +20,7 @@ import { stats, parseMb, checkRegressions, BenchmarkResult, BenchmarkReport } fr // ── Configuration ────────────────────────────────────────────────── -const ITERATIONS = 5; +const ITERATIONS = parseInt(process.env.AWF_BENCHMARK_ITERATIONS || '30', 10); const AWF_CMD = "sudo awf"; const ALLOWED_DOMAIN = "api.github.com"; const CLEANUP_CMD = "sudo docker compose down -v 2>/dev/null; sudo docker rm -f awf-squid awf-agent 2>/dev/null; sudo docker network prune -f 2>/dev/null";