Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/performance-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,29 @@ jobs:
- name: Run benchmarks
id: benchmark
run: |
npx tsx scripts/ci/benchmark-performance.ts > benchmark-results.json 2>&1 || true
npx tsx scripts/ci/benchmark-performance.ts > benchmark-results.json 2>benchmark-progress.log || true
cat benchmark-progress.log
echo "--- JSON output ---"
cat benchmark-results.json

- name: Upload results
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ github.sha }}
path: benchmark-results.json
path: |
benchmark-results.json
benchmark-progress.log
retention-days: 90

- name: Validate benchmark JSON
run: |
if ! jq empty benchmark-results.json 2>/dev/null; then
echo "ERROR: benchmark-results.json is not valid JSON"
cat benchmark-results.json
exit 1
fi

- name: Check for regressions
id: check
run: |
Expand Down
4 changes: 4 additions & 0 deletions scripts/ci/benchmark-performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
* - Docker network creation time
*
* Outputs structured JSON with mean, median, p95, p99 per metric.
*
* IMPORTANT: stdout/stderr contract:
* - stdout (console.log): JSON result only — consumed by the CI workflow via redirect to file
* - stderr (console.error): progress messages and diagnostics — kept separate so JSON stays valid
*/

import { execSync, ExecSyncOptions } from "child_process";
Expand Down
Loading